Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causes a continuous increase in memory usage #284

Open
MrPeak opened this issue Mar 14, 2018 · 2 comments
Open

Causes a continuous increase in memory usage #284

MrPeak opened this issue Mar 14, 2018 · 2 comments

Comments

@MrPeak
Copy link
Contributor

MrPeak commented Mar 14, 2018

I am a Sketch Plug-in developer.

Expected behavior:

Sketch occupies almost no fluctuation in memory usage each time the plugin command containing react-sketchapp is called.

Observed behavior:

Each call to the command increases Sketch's non-recoverable memory footprint

How to reproduce:

See antd-sketchapp demo.

Sketch version:

All versions.

Please attach screenshots, a zip file of your project, and/or a link to your github project

kapture 2018-03-14 at 16 27 43

@MrPeak
Copy link
Contributor Author

MrPeak commented Mar 14, 2018

I checked this problem in your project. It should be caused by the failure to recycle the asm.js memory allocation.

track chain: react-sketchapp -> yoga -> asm.js

And I found this issue.

image

@lordofthelake
Copy link
Contributor

I think this can likely be solved by free-ing the yoga.Nodes at the end of the render

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants