Project

General

Profile

Is it possible to release memory usage after setImageLink

Added by Jason D almost 2 years ago

Hi,

I'm trying to load 100,000 WImages on to the page, is it possible to release the private memory size for WImages on server side after setImageLink?
I don't need to refer back to these elements in C++ code afterward, but do want to keep them on the client browser.

Any comments is greatly appreciated, thanks in advance!

Best Regards,
Jason Dong


Replies (1)

RE: Is it possible to release memory usage after setImageLink - Added by Matthias Van Ceulebroeck 5 months ago

Hello Jason,

I am going over older unresolved things, so I apologize if I bother you with an email.

If the images only have to be rendered without any further functionality, this can be arranged by overriding WWebWidget::render() for example. And only do the actual full render of all the images if the type = RenderFlag::Full.
This will ensure that the images only live for one iteration of the rendering loop. This does hold the side-effect that none of the images function a WImages, as in that they cannot be interacted with in any way, unless you specific some custom JS.

Best,
Matthias

    (1-1/1)