LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Lag with List Folder

Solved!
Go to solution

hi everyone!

 

while building a vi to list and compare files in a directory, i ran into a strange behavior:

 

the "List Folder" function (as well as "Recursive File List.vi", "List Directory__ogtk.vi", "List Directory Recursive__ogtk.vi") takes occasionally about 30s to complete, in normal cases, it takes <1s.

 

i went through the "eventvwr.msc" but there is nothing that hints to why? (like disk error for example)

 

do you guys have any idea, why this happens?

 

thanks in advance

 

appended my little test.vi (which runs all 4 functions 5 times each .. in total 20 runs)

running via labview-development-environemt and built as .exe doesn't change the result.

 

i am on LabVIEW2016 32bit (with latest updates) and Win10 64bit

 

 

EDIT: so far i noticed, that it only happens for the first get-files-in-dir executed, since this is "List Folder" function in my test vi, i will shuffle these, but i have seen the same lag behaviour for the other functions as well.

EDIT2: can confirm, it only happens for the first execution (regardless of which function is used).

EDIT3: first function execution takes about 30s, every other then takes a sensible amount of time. if my vi is then executed again immediately every function takes a sensible amount (even the first), until a few runs (always immediately executed after finishing) a function in the middle of the loop takes about 30s. this looks like a caching situation, where the cache gets stale and has to be re"built".


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 1 of 6
(2,990 Views)
Solution
Accepted by topic author jwscs

A wild hunch: Do you have mapped network folders in your Explorer that are temporarily unavailable at the time these delays happen?

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 6
(2,954 Views)

yes i do have network folders mapped, which are not present here at work, but at home.

 

where did you get your hunch from?


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 6
(2,952 Views)

where did you get your hunch from?


About 25 years of LabVIEW practice and some inside knowledge.

Rolf Kalbermatter
My Blog
Message 4 of 6
(2,948 Views)

thank you for that, i guess this will be the solution, but i can not remove the network share,

have to test again at home.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 5 of 6
(2,945 Views)

finally managed to remove the share,

and the lag is gone.

 

EDIT: as for the WHY .. i guess i don't bother 😉


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 6 of 6
(2,940 Views)