the incoming 180 files are getting changed as its coming from another loop so using cache region doesnt work (many iterations of the same 180 files are being delivered to the for each loop )
thanks for helping folks
the incoming 180 files are getting changed as its coming from another loop so using cache region doesnt work (many iterations of the same 180 files are being delivered to the for each loop )
thanks for helping folks
Is that a question?
If so, is order matters?
This basically you need your own kind of manager…
iam using backtoback FOREACH loops, also rendering these images in stride as texture, i ran into a heavy processing load and had been trying to solve it for a long time
yes order matters and iam not familiar with this manager you are talking about
Yea, you need some sort of queue combined with order that would be so called manager. Basically a manager is a class that holds a spread of incoming images, checks if image already loaded and loads additional images, in a way it accommodates order…
You have to write that yourself, dunno if I can help, maybe on Monday, you can elaborate a little about actual scenario and may be provide some example with a folder that has images that change dynamically and should be in order…
forumupload.zip (31.0 KB)
Hi, please take a look at the file and let me know if there is any confusion
just briefly looked at the patch, might overlook something but few things:
-on the getfiles node, use the search pattern pin with (*.jpg) to skip the second loop that filters for jpg files.
-the repeat loop you are concerned with: why not just put it in a cache region?
-there might be a better way for all this using the filewatcher node. then just spawn a class for each new file that would read and resize an dnot compute anymore. no need to iterate the whole file list over and over
Thank you.
cache region doesnt stay on till computing all the files, i had to use force cache to make it properly run the n number of files i needed processing
all the nodes in this image before my actual problem are made to illustrate my actual problem.
the getspread node here changes the spread whenever i change the index and the following loop should only run when there is change in the spread . it shouldnt run indefinitely.
i tried looking at filewatcher node. but need more tutorials on this and on observables
thanks again for looking into this
Your cache region needs an input via a knot in the top of it, so whichever spread is changing goes in via that and that triggers it to cache. But I wonder if the cache went inside the foreach, then it would only update the slice that changes?
the issue is that an async loading node will not work in a cache region i think. then still the loop iterates over all files no matter new or old.
it took me few attempts to come up with something but it feels too complicated. i would be very interested how to simplify this task/patch, i am sure there is a better way.
TextureWorker.vl (31.9 KB)
@tgd i found this very helpful, iam learning this as we speak, hold on
can i share a few details about what iam struggling with ?
i already have a spread of images(paths) incoming which is cross checked with a an excelsheet, now iam trying to load the images after crosschecking and filtering from the excelsheet and folders, that is now done and i have a spread of images to load, but when trying to load as textures - its running indefinitely, i will share the ui of what iam working on so it will share an idea whats the end situation of images are to be. hope this image also helps
the ui is not helping:)
there should be no big performance impact once the textures are loaded, even when the loop still iterates. think what actually costs you each frame is the resizing. just put these nodes in a cache region and it should be fine.