From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get properties from a large TDMS file is very slow

Solved!
Go to solution

I have a very large TDMS file with about 3000 properties. After I open the file it take about 2 sec to read a property with the TDMS Get Properties VI. I'm trying to read all the properties so I can perform some math on them. It's taking way too long to read them all. Is there a faster way to read them. I'm thinking now I should have stored the values in a channel, but that doesn't help my current situation.

 

George

0 Kudos
Message 1 of 5
(2,555 Views)

Hi George,

 

Do you mean it takes 2 seconds to just for "Get Properties" or for "TDMS Open" and "TDMS Get Properties". What is the size for the .tdms file and the .tdms_index file? Could you please try use "TDMS Defragment" and then try to see how long it will take to get the property.

0 Kudos
Message 2 of 5
(2,537 Views)

It takes 2 seconds to just for "Get Properties"to grab a value. The file is already open and I'm getting the properties in a loop. The file size is about 731,000k and the index file is 390k. I did do a defrag and it didn't help at all.

 

George

0 Kudos
Message 3 of 5
(2,528 Views)
Solution
Accepted by topic author GS

Thank you for your reply, George!

Then I'm afraid there's no easy workaround unfortunately. If possible, maybe you can consider to split the TDMS file to some smaller TDMS files. We did have similar bugs report, about the performance of TDMS Get Properties, especially when having a large number of TDMS properties, we have been working on the possible optimization now.

0 Kudos
Message 4 of 5
(2,524 Views)

@GS wrote:

I'm thinking now I should have stored the values in a channel, but that doesn't help my current situation.

 

George


I usually see the opposite from developers.  Instead of writing to properties for single point settings (like logged on user) they will write a channel with one point of data.  While you already know this, I would recommend to anyone using TDMS to only use properties for things that don't change for the life of the file.  Start time, PC name, logged on user, test setup parameters, starting conditions maybe.

 

When talking to people that hate TDMS, I find it is usually from a bad experience they had with a file structure that wasn't right for the application, or the developer made mistakes that made it difficult to manage the data.  TDMS is probably one of the easiest file format to use in LabVIEW and it is very flexible.

0 Kudos
Message 5 of 5
(2,503 Views)