You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on a GUI framework with webrender as the rendering engine. I've noticed that the RAM consumption is about 100MB when I start rendering text. This happens on both Windows and Ubuntu. I understand that text rendering is quite complex and calculation intensive, but doesn't 100MB RAM seem a bit too much? Maybe I'm doing something?
The difference between both these runs is that for the run without text rendering I've commented out the following line: line 166: map.insert(c, (gi[i], gd));
The text was updated successfully, but these errors were encountered:
This is probably caused by the lazy allocation of the texture atlas.
WR will only start allocating memory for the texture cache once an image / glyph is placed in it for the first time. Unfortunately, the texture cache is currently a large, fixed size. The downside is that there is an immediate jump to a large memory usage - but on the plus side, there generally won't be any further allocations made, even as you add thousands more glyphs / images.
There is some ongoing work by @bholley to make the texture cache start out much smaller, and grow as required, which should fix this.
I've been working on a GUI framework with webrender as the rendering engine. I've noticed that the RAM consumption is about 100MB when I start rendering text. This happens on both Windows and Ubuntu. I understand that text rendering is quite complex and calculation intensive, but doesn't 100MB RAM seem a bit too much? Maybe I'm doing something?
You can find the code sample here: fasihrana/skryn.
With text rendering:
Without text rendering:
The difference between both these runs is that for the run without text rendering I've commented out the following line:
line 166:
map.insert(c, (gi[i], gd));
The text was updated successfully, but these errors were encountered: