I have a cronjob that uploads to snapshot images from my NVR to a VPS every 5 min. They are all statically named (IE: Driveway.jpg, Kitchen.jpg, etc...) and the location doesn't change. There is no HTML, just a folder with images. Currently I have the below skin that updates and displays them in a grid. It works great! No problem...except it uses about 80mb of my resource and this seems a little high.
This may be normal, however, i'm hoping someone might give me some pointers to possibly make it a bit more efficient on resources. I'm open to most any suggestion. I made something that works, just hoping to make it better and learn.
Forgive me if this is a common question. I just didn't find anything in my limited search.
Last edited by jsmorley on November 20th, 2018, 3:27 pm, edited 3 times in total.
Reason:Please use [code] tags on long code snippets. It's the </> button.
Personally I would save the images to your hard drive and then get rid of all the Webparser measures. I would only use Webparser if I could not access the images any other way.
The only source of knowledge is experience. Albert Einstein Deviant Art Page
CyberTheWorm wrote: ↑November 20th, 2018, 4:48 pm
Personally I would save the images to your hard drive and then get rid of all the Webparser measures. I would only use Webparser if I could not access the images any other way.
This is exactly what has been done: the WebParser measures download the appropriate images, then the Image meters show them. How often the WebParser measures re-download the images depends on their UpdateRate option. Here these operations go on once per minut (due to the UpdateRate=60 options set up on all WebParser measures), I probably would increase them, but I doubt there would be something else to be done.
However I see one problem in the posted code: unlike in programming languages, in Rainmeter you shouldn't have to put the comments in the same line as any option or section name (particularly here in the same line as the meter names). See my Tip hereAND especially jsmorley's next post.
If the images are static and unchanging, then yeah, WebParser isn't needed. Just download them and store them locally in @Resources with the skin.
If the images are not static and unchanging, then the only way to do this is with WebParser.
In both cases, the amount of memory resources used will be more or less the same. Rainmeter will "cache" any images that you load into an Image meter, so whether you store them locally in @Resources, or WebParser temporarily stores them in %TEMP%, the result on memory is the same. At the end of the day, they are loaded from a local file in either case.
Awesome! This was exactly the feedback I was looking for. If there is nothing to be done (minus the comments) then that is the answer. I just wanted to make sure there something I was doing incorrectly to cause issues and you all answered that!