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

Memory Leak from Preview ? #91

Open
martin-alt opened this issue Aug 30, 2019 · 4 comments
Open

Memory Leak from Preview ? #91

martin-alt opened this issue Aug 30, 2019 · 4 comments

Comments

@martin-alt
Copy link

@superlou Sorry if I'm violating GH protocols, I'm new. First, thanks so much for creating fountain-atom, I wasn't ready to take the plunge on Highland and now that I've had 10 minutes in Atom, I don't see any reason I would (with due respect to John August, whom I do admire.)

I have noticed whenever I do an Afterwriting preview, it adds ~300MB to the memory pile, and then doesn't release it after I close the preview tab. Over many previews (writers need lots of encouragement after all) at one point I noticed it was at a whopping 18GB and I had to restart Atom altogether. Not sure if this is an Afterwriting thing, or unrelated (I'm on old 13" mid-2012 Mac, High Sierra.)

Just wanted to run it up the flagpole... Thanks again for making!

@jrbostic
Copy link
Collaborator

jrbostic commented Jan 9, 2020

This alarmed me a bit. Looking into it, I'm not seeing evidence that the fountain-atom package is directly responsible. We do generate a file based on pathing and the name of the fountain file, but it targets the same path each time. @superlou I am seeing some strange "pdf.worker.js" pop up in the Sources tab of developer tools each time a preview is rendered. I wonder if the pdf-view package is not cleaning up...

@superlou
Copy link
Owner

@jrbostic and @martin-alt, sorry I missed this issue! I agree this is really concerning and am not sure what would cause this. @martin-alt, what OS are you using?

@martin-alt
Copy link
Author

martin-alt commented Jan 10, 2020

Hi @superlou and @jrbostic, thanks much for taking a look. I'm on an old mid-2012 MBP running High Sierra 10.13.6. Atom 1.42 (via Brew if it matters) and Fountain 0.8.3.

Behavior is the same, every time I generate a new preview through Fountain (^ opt shift M) an 'Atom Helper' adds several hundred more MB to memory and doesn't let it go. It starts by adding 2-300MB but the chunks seem to get bigger with subsequent iteration, i.e. later increases are ~500MB, then ~700MB etc. Sorry, I'm not technician enough to know where to see exactly what this Atom Helper is, but its behavior is correlated with the preview action.

I just restart periodically if machine bogs down, but wouldn't mind tidying it if easy/possible for elegance sake. Thanks again for response, obviously don't devote a disproportionate amount of time – but any thoughts welcome and appreciated!

superlou added a commit that referenced this issue Jun 27, 2020
@superlou
Copy link
Owner

We're requiring a pretty old version of pdf-view, 0.59.0, but I'm wondering if it's related to this open issue. Someone's made a new PDF viewer in response: https://github.com/Aerijo/atom-pdf-view-plus.

I started a new branch at https://github.com/superlou/fountain-atom/tree/pdf-view-plus that adds pdf-preview-plus as a dependency. However, you need to disable pdf-preview for Atom to use pdf-preview-plus. Is there a way to force a URI to use a specific plugin?

@martin-alt, you might be able to try it simply by installing pdf-preview-plus and disabling pdf-preview.

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

No branches or pull requests

3 participants