edusis / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

Script speed/performance #99

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Increase the speed of which the script works while placing objects at
correct spot
2.
3.

What is the expected output? What do you see instead?
The script does work, apart from an infinit vertical scool, however it
works too "slow". 
When the site loads, all objects are first placed according to the buggy IE
6 method. When the script kicks in, to takes a little less than a minute to
set all objects straight, according to the proper CSS file for a standard
compliant browser.

What version of the product are you using? On what operating system?
I am using the IE7.js from 3 febuary 2008.
I am using multi browser view, but the problem occurs only in IE 6. *I do
not have IE 8 installed*.

Please provide any additional information below.
The "slow" responds is unacceptable for the site i am working on. To me, i
couldn't care less. But i need to know if there is a way to fasten things
up so that the almost one second delay can be reduced to a milisecond.

Original issue reported on code.google.com by wouterol...@gmail.com on 29 Jul 2008 at 11:58

GoogleCodeExporter commented 8 years ago
I have noticed that if the script is added just before the </head> tag it is 
more
speeder. I have also added another script, in my css the main div is in
visibility:hidden and on the onload I start a timeoutscript that check for the
property maxWidth == 'the value I have set in css', if the maxwidth exist, so 
the
ie8.js is ready and fully loaded.
Here my function 

function pageon() {
// Function servant à corriger un bug d'affichage au niveau de la largeur 
automatique
pour les version ie antérieures à 7.
// N'affiche pas le div page tant que le code script ie8.js n'est pas chargé.
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ 
    var ieversion=new Number(RegExp.$1);
    if (ieversion <= 6) {
            document.getElementById("page").style.width = document.body.clientWidth < 780?
"758px" : document.body.clientWidth > 1280? "1256px" : 
document.body.clientWidth-12;
            timer = setTimeout("pageon()",1000);
            if (document.getElementById("page").style.maxWidth == "1256px") {
                document.getElementById("page").style.visibility ="visible";
                clearTimeout(timer);                
            }
    } else {
    document.getElementById("page").style.visibility ="visible";
    }
} else {
    document.getElementById("page").style.visibility ="visible";
}
}

Original comment by olivier....@gmail.com on 2 Apr 2009 at 2:38

GoogleCodeExporter commented 8 years ago
I'm always looking at ways to improve performance. If you have any ideas then 
let me 
know.

Original comment by dean.edw...@gmail.com on 11 Feb 2010 at 3:07

GoogleCodeExporter commented 8 years ago
What about adding the possibility of a (messy) do_it() right before </body>, 
for pages/layouts that need the speed? Wouldn't that load and run the script 
earlier?

Original comment by akaxakaster@gmail.com on 19 Jun 2010 at 3:16

GoogleCodeExporter commented 8 years ago
Supposedly, to make pages load faster, scripts should be the last thing, if 
possible:
http://developer.yahoo.com/performance/rules.html#js_bottom

This script might be different, though, because it's not really a functionality 
so much as a fix for what's to appear on the page.  Anecdotally, I've tried it 
before the head, in the head, and after the body, and don't really see a 
difference.

I'd say the png transparency is what takes it the longest on my pages.  There 
must be a way, if the same image is repeated over and over, that it could just 
do the conversion once and just repeat the converted image rather than fixing 
it over and over.  I have one page in particular that has a fancy up arrow and 
a fancy down arrow, each 16x16 png is repeated 131 times.  IE6 loads the page 
then you see a quick countdown from 262 and watch all the arrows gray 
backgrounds disappear one by one.

If I remember correctly, the reason why png conversions take so long is that 
it's rewriting the png as a gif pixel by pixel.  So, to speed this process up, 
what I would expect is that only two of these pixel by pixel conversions need 
to take place, then the converted image simply gets used every time that same 
image is seen again on the page the other 130 times.

Original comment by undrl...@gmail.com on 7 Feb 2011 at 5:58

GoogleCodeExporter commented 8 years ago
what about using an external framework like jQuery, Mootols, etc like 
Selectivizr?

Original comment by enrique....@gmail.com on 13 Apr 2011 at 10:29