Page load increase with YUI #14
Comments
I'm noticing something similar. I'll be looking into it. |
I pushed a new RC (2). In it, I'm caching the YUI results so that library isn't being called excessively. On a small project, this seemed to cut ~.2 seconds off of page load. On a large project, this seemed to cut ~1.8 seconds off of page load. Good catch, I didn't notice the drain YUI was having. |
Awesome! I tested your changes here and the load time (after cache) reduced to ~80ms. Now it works like I expect. It saves me almost 4s per call. =) Thanks! I'm closing the issue. |
Oops, I just tested the page load, but I saw some weird bug. I have something like this: <%= Assets.RenderJavascript("cufon") %>
<%= Assets.RenderJavascript("master") %>
<%= Assets.RenderJavascript() %> It adds the same group three times (the first group): <!-- Assets:
F:\...\localhost\js\cufon.js
F:\...\localhost\js\museu300_400.font.js
F:\...\localhost\js\museu500_500.font.js
F:\...\localhost\js\cufon_exec.js
-->
<script src="/assets.axd?type=Javascript&key=-1632755057" type="text/javascript"></script> (I removed my physical path from the html above) This code repeats three times, the other two groups are not printed. I have other two renders in the same file (in head) and they work fine. These three are in the bottom (to increase performance). It happens only with YUICompressor enabled, probably related with these cache changes. |
Okay, try RC3. The cache wasn't being specific enough with what it cached and after assets are combined, they start to look the same. |
With RC3, I got this exception in one of my environments.
In my machine it worked fine, but in another machine it crashed. I'm not sure what happened. |
I added some defensive code around the offending methods in my latest commit (not a package this time). I'm not sure how this error could have happened however. Any additional details would be appreciated. |
Your workaround worked. Thanks! I tried to get more information about the problem, it happens because of this asset: Assets.MasterJavascript("http://html5shim.googlecode.com/svn/trunk/html5.js", "third").ForIE(IE.Equality.LessThan, IE.Version.IE9).Add(); When I remove it, assets works fine, even without your last change. The error happens on javascript rendering Probably it is something with remote files. EDIT: it happens in all my environments. |
I'm using LuckyAssetManager in a big site. I discovered it is really slow when any YUI compressors are enabled, even after files were cached. It increases page load to something like ~4s in all requests. Disabling YUI, it delay ~.8s in first load and ~80ms after that.
I don't know if I'm doing something wrong or if it is some caching bug. Configuration difference is only YUI compressors.
This difference is in page load, not in assets request, so I guess it is generating assets all the time, ignoring cache.
If you have any insight about that, I'm grateful to you. Thanks!
The text was updated successfully, but these errors were encountered: