Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTexture pages are not properly reused or deallocated #914
Comments
|
Note the comment:
|
|
I guess it's time to fix that! |
|
I guess I shouldn't try to actually remove the |
|
It'd probably be worth adding some profile counters that track some of the texture cache stats (e.g. total bytes allocated, page count etc) so that we can visually see if something is leaking in the future. |
Texture allocation refactoring Fixes #914 Note: the [comment](#914 (comment)) appears to be irrelevant, since the actual texture freeing happens in `texture_cache`, and the free list just contains texture items, which are plain old data (PODs). @staktrace I suggest we proceed with this PR and check if it resolves your issue, then potentially come with a follow-up. @glennw r? <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/919) <!-- Reviewable:end -->
|
@kvark thanks, the fix seems to work! |
When running the gecko webgl mochitest suite, WR memory usage climbs into multiple gigabytes (see https://bugzilla.mozilla.org/show_bug.cgi?id=1341745). I traced this down to the fact that WR periodically allocates a new TexturePage but never goes back and reuses old texture pages or deallocates them if they are empty. I checked with @kvark and he agreed that this appears to be a bug. Quoting him from IRC: