First of all, that generateBlueprint(0 feature is really cool and very valuable !
I have some questions about the inline stuff.
We tried to avoid having to do an insertInlineLayers() in the thread round about inline layers, so I'm not sure what the benefit is ?
Plus the way it is, if you mixed inline layers and non inline layers, then it would lead to issues.
In insertInlineLayers:
what is the purpose of sending DynElement._flagEvent(c,'precreate'); ?
what is the purpose of the dynapi.frame.document.write ?
Then, I don't see a way to call _importInlineValues later on if needed.
I have a question about keeping variables for x,y,width etc ... past creation in the dynlayers as these values are in the dom anyway. Is it because it is a fact that accessing this.x is faster than this.elm.style.offsetLeft ?
I think it might be better to take the route of lazily mapping the values, if there's really a benefit to map.
The 2 benefit I see is first speed, you don't pay the price of initializing values of layers that the user might not use, and second it's transparency to the developer.
And for the layers created by dynapi code, it doesn't make a difference since in that scenario, the variables would be mapped anyway.
Then it means that we don't use this.elm anymore, but this.getElm() instead to ensure proper loading.
For example for the dom case :
p.getDoc=function() {
if(!this.doc) {
this.doc = this.parent.getDoc();
}
return this.doc;
}
p.getElm=function() {
if(!this.elm && this.id && this.isInline) {
this.elm = this.getDoc().getElementById(this.id);
}
return this.elm;
};
p.getCSS=function() {
if(!this.css) {
this.css = this.getElm().style;
}
return this.css;
};
p.getX=function() {
if(!this.x) {
this.x = this.getElm().offsetLeft;
}
return this.x||0
};
Skipping the _importInlineValues part really does speed thing up. So what do we do ?
Benoit
On Monday, March 17, 2003, at 09:24 PM, Raymond Irving wrote:
Hello Everyone,
I'm very happy to present to you the results of a
recent test I've done with a new inline feature I
called blueprint. The results are nothing but
fantastic:
IE (Basic) = 200 @ 250ms, average 180ms
IE (Deep_Nest) = 100 @ 180ms, average 140ms
How it works:
The trick is to have dynapi generate the entire
blueprint or inline layers for the application you're
going to load. To do this you'll have to use the
dynapi.document.generateBlueprint() function. This
will display the inline layers inside the debugger
window. You must however remember to remove the
dynapi.document.generateBlueprint() and the debug
library once you're finshed.
Now that you have the inline code you can insert it
into the document or a .js script. The next step is to
use dynapi.document.insertInlineLayers() function to
load the inline layers.
New/modified functions:
DynLayer._importInlineValues
DynLayer.prototype.ignoreInlineValues
dynapi.document.generateBlueprint
dynapi.document.insertInlineLayers
You can download the files here:
http://www24.brinkster.com/dyntools/next/dynapi3x.zip
See the online examples here:
http://www24.brinkster.com/dyntools/next/examples/speedtest.dynlayer.inline-basic.html
http://www24.brinkster.com/dyntools/next/examples/speedtest.dynlayer.inline-basic-dom.html
http://www24.brinkster.com/dyntools/next/examples/speedtest.dynlayer.inline-deep_nest-dom.html
Any comments?
Benoit,
I hope this will solve the speed issue with inline
automation. Correct?
--
Raymond Irving
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/