bdkjones / CodeKit2

CodeKit 2 Beta
98 stars 4 forks source link

Browser task gets stuck after a view refresh / reload #602

Open VIEWSION opened 8 years ago

VIEWSION commented 8 years ago

I use Chrome and Safari on a Mac for preview with browser refreshing. I also use an external server (MAMP). It works fine as expected at the beginning. But after a view (let's say 10-20) reloads, the browser tab gets kind of stuck and it takes a long time until it is responding in any way. I need to close the tab then and open a new one to get it work as expected again.

If I look at the tab task in the activity monitor, I noticed that the memory usage grows on every refresh from about 50MB in the beginning exponentially up to 2GB and more until the task gets completely stuck like described.

bdkjones commented 8 years ago

This sounds like a syntax issue on the page that's causing CodeKit to not be able to remove old stylesheet <link> tags from the <head>. Please take a screenshot of the entire page source in the inspector as the problem occurs.

And, of course, verify that there are no syntax issues on the page.

VIEWSION commented 8 years ago

Ok - I check this out. I also noticed that it is much better when the Chrome cache is activated. I usually deactivate caching for development. When the problem occurs, there is not only a high memory usage in the activity monitor but also a very high CPU load on the chrome task.

VIEWSION commented 8 years ago

here is the screenshot. Seems that the injected stylesheets do not get deleted somehow... I also wanted to make a copy of the whole source, but when I tried to open the source window it was reloading and all the css links disappeared.

unspecified unspecified-1

bdkjones commented 8 years ago

Yep. That explains it. Do you see any JavaScript console errors logged in the web inspector?

On 10Feb 2016, at 15:02, VIEWSION notifications@github.com wrote:

here is the screenshot. Seems that the injected stylesheets do not get deleted somehow... I also wanted to make a copy of the whole source, but when I tried to open the source window it was reloading and all the css links disappeared.

https://cloud.githubusercontent.com/assets/6938427/12964528/eeb25e7a-d050-11e5-90a8-936211b48a9a.png https://cloud.githubusercontent.com/assets/6938427/12964532/f413435c-d050-11e5-9740-91a74defea92.png — Reply to this email directly or view it on GitHub https://github.com/bdkjones/CodeKit/issues/602#issuecomment-182626177.

VIEWSION commented 8 years ago

No - there are no JS error logs

bdkjones commented 8 years ago

In that case, I'll need the project so I can test it on my end. Zip it and send me a download link, please.

Sent from my iPhone

On Feb 10, 2016, at 23:44, VIEWSION notifications@github.com wrote:

No - there are no JS error logs

— Reply to this email directly or view it on GitHub.

VIEWSION commented 8 years ago

Ok. This is not that easy as the setup is quite complex with server side stuff, database and CMS framework... I try to strip it down to a static html demo...