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

Reloading CSS causes exponential memory usage #23

Closed
manveru opened this issue Sep 17, 2015 · 10 comments
Closed

Reloading CSS causes exponential memory usage #23

manveru opened this issue Sep 17, 2015 · 10 comments
Labels

Comments

@manveru
Copy link

manveru commented Sep 17, 2015

There seems to be a bug in the live reloading, here's my <head> after saving a CSS file 5 times (without making any changes).

2015-09-17 16_35_54

@josevalim
Copy link
Member

Thank you! Is it because we need to remove the old stylesheet around here? https://github.com/phoenixframework/phoenix_live_reload/blob/master/priv/static/phoenix_live_reload.js#L1

@manveru
Copy link
Author

manveru commented Sep 17, 2015

well, link.remove() is supposed to do that. but it seems like this function is appending two new <link> tags for every previous tag.

@chrismccord
Copy link
Member

I"m trying to recreate without much luck atm

@chrismccord
Copy link
Member

can you include the entire head of your layout here?

@manveru
Copy link
Author

manveru commented Sep 17, 2015

I suspect it's a combination of a big CSS files and the server being remote, so it could be a race condition?

@manveru
Copy link
Author

manveru commented Sep 17, 2015

I can give you access to the server if you want, will PM you via slack.

@Gazler
Copy link
Member

Gazler commented Sep 17, 2015

We fixed this over IRC - but for future readers, if you are using vim then the following will fix it:

set backupcopy=yes

To fix it permanently put that in your vimrc file.

@chrismccord
Copy link
Member

@manveru fixed on master. Please set vim back to whatever write mode it was doing and verify the fix, then I'll push a new release. Thanks!

@manveru
Copy link
Author

manveru commented Sep 17, 2015

I couldn't reproduce the bug anymore, so consider it fixed. Thanks for the help!

@chrismccord
Copy link
Member

1.0.1 has been released, mix deps.update phoenix_live_reload and you are all set!

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

No branches or pull requests

4 participants