Hey, I am currently evaluating gamma/skia for a potential future project, where I need to load a larger amount of images. Up to certain point the performance in skia is fine but then it suddenly caves.
The machine I am testing on:
Wind 10 Pro x64
vvvv gamma 2020.1.7
vvvv beta 40 with latest DX11
GTX 1070-Ti with 8GB of Memory
The gamma test patch looks like this (renderer fullscreen on second monitor 2560x1600@60Hz):
With 85 images it goes down to about 13 FPS. The memory usage only slightly increases and timings in gamma also don’t change significantly, but GPU usage makes a big jump. In my earlier tests with different images (jpgs 354x388px) there was also a big difference in CPU usage.
Reading through this and that I assume images in VL.Skia aren’t GPU-accelerated and it also uses the GPU resource cache with a default size of 96MB.
Depending on what else is going on in the renderer this number corresponds pretty much to the number/size of images I can load before performance goes down.
Thanks a lot. The current default GPU ResourceCacheLimit is indeed 96MB. Setting it to a higher value solves the problem. I’d suggest to set a more sensible default in the future and to add the info to the documentation and help patches. Also a convenience node for setting would be nice.
Concerning drawbacks, as far as I understood the RessourceCache reserves/uses the set amount of memory in Ram AND VRam when images are not GPU-backed. Systems with integrated graphics that already use shared system Ram might more easily run into problems when setting the limit too high.
Maybe there is a possibility to gauge the system specs and set the limits accordingly?
But I really recommend reading through this thread those people are far more knowledgeable.
This solved my Skia performance issue in 2021.3.1. Is there already a convenience node for this job? We tried adding all dll functions manually. Especially “GRContext” was hard to find, since the dll has a new name in the latest version.
Out of the box skia is unable to use more than 100MB VRAM atm. lol Did nobody try this with more than one bigger texture? Maybe the elementa performance issues is also caused by this?
The default resource limit has been increased to 512 MB (from 96 MB) in 2021.4 previews. A GRContext is now held per thread (and not per renderer), therefor the patch I posted here will no longer make any sense and will crash for sure. Instead you’ll find a new node called GRContext which will give access to the Skia graphics context on the current thread as well as allow to configure the resource cache limit.
Yes - a graphics context is held per thread. You’ll need to be very careful when passing Skia objects from one such thread to another - Skia is not built for that and you’ll most certainly experience crashes.