-
Notifications
You must be signed in to change notification settings - Fork 34
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
History feature is memory hungry #106
Comments
Thanks for the report. This seems to be similar to what a reviewer was reporting (#58). And it does sound quite annoying. I see 2 issues here:
|
I can't quite seem to reproduce it. Here is what I tried:
Results:
So apparently it's not that simple. 🙂 Can you describe how your setup differs from my tests? |
i will try your test and compare it with mine asap 👍 |
I tested your request, i can do only one, i think i need more memory and a better pc because parsing the json takes some minutes, and i'm already using a lot of ram having many big open apps already so i notice very fast when something grows in memory. And you are right, the memory frees alone after a while, there's no need to do the clear history, but it is what it is, browsers eat a lot of ram, not much you can do. |
Okay, so the good thing is that there doesn't seem to be a memory leak. However adding more RAM shouldn't be the solution, I think. I'm going to experiment a bit. If it's JSON parsing and maybe highlighting that's the issue, maybe I can turn this off for large responses. |
It looks like the high memory consumption comes mainly from rendering the response body in Ace. Having "Wrap" turned on makes it a lot worse, so you may want to try turning that off. I also found that RESTer could do pretty printing slightly smarter. At the moment it:
I improved those points. However I found that pretty printing JSON is really fast and doesn't seem to use a lot of memory. If the response body contains very long lines pretty printing actually seems to help. The last thing I'm going to look into is turning "Wrap" off automatically for large responses. Then I'm going to release an update with the improvements. |
Those things will surely help, awesome! |
Version 3.11.2 should be available as an update shortly. I ended up not turning "Wrap" off automatically because long lines are quite hard to detect. But I added a warning for large responses, that turning off "Wrap" can improve the performance. I have one last rather drastic idea on how improve memory usage. I could completely hide large response bodies. Would that be helpful for you? I assume it could be a bit useless because the response body is generally the most important thing 🤔 |
Yeah that's the point of all, view the response haha
|
That's what I thought 😄. I thought there may be a slight chance you just want to see the status code or headers. I don't think there is any other thing wrong with RESTer. But memory consumption get still get very high, so I'm going to leave this issue open. Maybe I find another, less memory hungry way, to render the response body in the future. |
Could you make please a setting to disable history or limit the number of entries or disable saving response data?
I'm testing an api that returns 10MB jsons and in every request i see how my memory goes lower and lower :D ( I don't want to hit the "clean up history" button every now and then)
Btw this plugin is amazingly simple, fast and easy to use, great work!!
The text was updated successfully, but these errors were encountered: