cujojs / curl

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.
https://github.com/cujojs/curl/wiki
Other
1.89k stars 216 forks source link

curl.js is signaling script load too early for IE6-8 when under load #136

Closed unscriptable closed 11 years ago

unscriptable commented 11 years ago

During recent curl.js testing sessions, we found that curl may think a script has finished loading too early under certain circumstances in IE6-8. This only seems to happen when the module being loaded is considerably small and/or the browser is under some sort of cpu load. The symptom is very intermittent "define() missing or duplicated" errors which seem to occur more frequently -- but still very infrequently -- in IE6.

Loading more than 31 stylesheets using the css! plugin in conjunction with AMD modules (without optimizing) almost guarantees failure in IE6&7 due to cpu load resulting from the stylesheet shuffling. Loading less than 31 stylesheets or using IE8 does not typically fail.

Optimizing files with cram.js or r.js appears to solve the issue under all circumstances.

It appears that this bug has existed since version 0.4, so if you're not experiencing problems already, then upgrading to a recent version should not be a problem. :)

We've identified the likely source of the issue and are working on a quick fix for 0.7.1.