CodeKit2 icon indicating copy to clipboard operation
CodeKit2 copied to clipboard

Browser task gets stuck after a view refresh / reload

Open VIEWSION opened this issue 9 years ago • 7 comments

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.

VIEWSION avatar Feb 10 '16 09:02 VIEWSION

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.

bdkjones avatar Feb 10 '16 17:02 bdkjones

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 avatar Feb 10 '16 21:02 VIEWSION

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

VIEWSION avatar Feb 10 '16 23:02 VIEWSION

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

On 10Feb 2016, at 15:02, VIEWSION [email protected] 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.

bdkjones avatar Feb 11 '16 00:02 bdkjones

No - there are no JS error logs

VIEWSION avatar Feb 11 '16 07:02 VIEWSION

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 [email protected] wrote:

No - there are no JS error logs

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

bdkjones avatar Feb 11 '16 08:02 bdkjones

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...

VIEWSION avatar Feb 11 '16 08:02 VIEWSION