Ticket #1353 (closed defect: invalid)
Xinha.free is slower than is needed
| Reported by: | guest | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.96 |
| Component: | Xinha Core | Version: | trunk |
| Severity: | normal | Keywords: | memory leak, internet explorer, patch |
| Cc: | randy@… |
Description
There is a great likelihood that the Xinha.free function could be improved if the function only attempted to set the property to null if the property was confirmed to start with an even handler such as 'on'. The patch below executes the collectGarbageForIE function in IE 7 about one quarter second faster for me (with a blank message body)
Xinha.free=function(obj,prop){
if(obj == 'javascript:void(0)'){return;}
else if(obj&&!prop){
for(var p in obj){
Xinha.free(obj,p);
}
}else if(obj && prop.indexOf("src")==-1 && prop.indexOf("inner")==-1){
try{
obj[prop]=null;
}
catch(x){}
}
};
Also, the flushEvent function has a series of iterating x++ bits of code that are not used anywhere within the function and add a tiny bit of processing time to the garbagecollect helper function.
Change History
Note: See
TracTickets for help on using
tickets.
