Re: Interesting speed comparison ..
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 54382
interpreted = N
texte = Having seen this, of course I had to download and install PHP on my devmachine and run the same tests ;) The php_speed.txt had a couple syntaxerrors, but after a couple quick changes it was running fine. I was up mostof the night working on this ( thanks, Alain and Andrew ;) )The 'text variables' test is definitely the culprit here. Creating a largenumber of WebDNA text variables early in the template, has a dramatic effecton ALL other WebDNA processing for the remainder of the template.A few reasons for this:1. In most cases, WebDNA does not have a 'qualifier' to denote a textvariable, like the '$' in php. The WebDNA parser has to query all outercontext objects, asking each if it can identify a particular token. Thisdoes add more parsing overhead. I say 'in most cases', because you canaccess text variables using [text]mytextvar[/text], which will resolve a bitquicker, since the wrapping [text] identifies the inner content as a textvariable.2. The list object, used to store and retrieve text variables, is notoptimized for speed.3. Finally, and perhaps the biggest reason for the performance hit, is theorder in which the WebDNA parser queries the outer context objects, whenresolving a token. Many tokens, including context names and tag names, arerun through the list of known text and math variables, before beingidentified as a context name or global WebDNA tag. So if the variable listis large, identification of context and tags is slowed down.I think on average, most WebDNA programmers will not create hundreds, orthousands, of text variables in one template. So they will not be impactedby the issues described above. For those that do, there are a few WebDNA5.x features that can be used to help minimize the parsing overhead. The[Scope] context can be used to wrap sections of code that create and useseveral text variables, so that they are destroyed when the scope closes. AWebDNA array can be used to store a large number of values. A WebDNAfunction can be used to define code blocks that need to generate a largenumber of variables. Function calls are wrapped by an implied scope, sothat variables created within the function are destroyed when the functionis finished (unless the variables are created explicitly in the global namespace or an outer scope).We do plan to address the second and third items, so that performance isfast even for very large variable lists.-----Original Message-----From: Alain Russell [mailto:alain.russell@blackpepper.co.nz]Sent: Thursday, November 20, 2003 6:53 PMTo: WebDNA TalkSubject: Interesting speed comparison ..So Andrew has made a copy of the speed test in PHP ..Interesting results ..http://utility.blackpepper.co.nz/webdna_speed/php_speed.phphttp://utility.blackpepper.co.nz/webdna_speed/webdna_speed.htmlThis is the same machine - Dual 2G G5, Dual HDD ..The source code is available for people that know PHP (You'll need tocreate a username/database etc)http://utility.blackpepper.co.nz/webdna_speed/php_speed.txtAny comment from SMSI on why variables/math etc are so much slower ??Running v4.5.1 by the way ..Alain-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Having seen this, of course I had to download and install PHP on my devmachine and run the same tests ;) The php_speed.txt had a couple syntaxerrors, but after a couple quick changes it was running fine. I was up mostof the night working on this ( thanks, Alain and Andrew ;) )The 'text variables' test is definitely the culprit here. Creating a largenumber of WebDNA text variables early in the template, has a dramatic effecton ALL other WebDNA processing for the remainder of the template.A few reasons for this:1. In most cases, WebDNA does not have a 'qualifier' to denote a textvariable, like the '$' in php. The WebDNA parser has to query all outercontext objects, asking each if it can identify a particular token. Thisdoes add more parsing overhead. I say 'in most cases', because you canaccess text variables using [text]mytextvar[/text], which will resolve a bitquicker, since the wrapping [text] identifies the inner content as a textvariable.2. The list object, used to store and retrieve text variables, is notoptimized for speed.3. Finally, and perhaps the biggest reason for the performance hit, is theorder in which the WebDNA parser queries the outer context objects, whenresolving a token. Many tokens, including context names and tag names, arerun through the list of known text and math variables, before beingidentified as a context name or global WebDNA tag. So if the variable listis large, identification of context and tags is slowed down.I think on average, most WebDNA programmers will not create hundreds, orthousands, of text variables in one template. So they will not be impactedby the issues described above. For those that do, there are a few WebDNA5.x features that can be used to help minimize the parsing overhead. The[scope] context can be used to wrap sections of code that create and useseveral text variables, so that they are destroyed when the scope closes. AWebDNA array can be used to store a large number of values. A WebDNAfunction can be used to define code blocks that need to generate a largenumber of variables. Function calls are wrapped by an implied scope, sothat variables created within the function are destroyed when the functionis finished (unless the variables are created explicitly in the global namespace or an outer scope).We do plan to address the second and third items, so that performance isfast even for very large variable lists.-----Original Message-----From: Alain Russell [mailto:alain.russell@blackpepper.co.nz]Sent: Thursday, November 20, 2003 6:53 PMTo: WebDNA TalkSubject: Interesting speed comparison ..So Andrew has made a copy of the speed test in PHP ..Interesting results ..http://utility.blackpepper.co.nz/webdna_speed/php_speed.phphttp://utility.blackpepper.co.nz/webdna_speed/webdna_speed.htmlThis is the same machine - Dual 2G G5, Dual HDD ..The source code is available for people that know PHP (You'll need tocreate a username/database etc)http://utility.blackpepper.co.nz/webdna_speed/php_speed.txtAny comment from SMSI on why variables/math etc are so much slower ??Running v4.5.1 by the way ..Alain-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Scott Anderson"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Almost Real Time (2002)
still having shipCost.db Problem (1997)
Security Issues and WebCommerce Solution (1997)
SSL and reg web*L and reg web* (1997)
Multiple security dbs (1997)
Hiding HTML and page breaks (1997)
The old multiple selection bit (2000)
docs for WebCatalog2 (1997)
flushdatabases (1997)
Search design (1997)
Autoreturn Submit? (1997)
Hosts who have upgraded to v5.0? (2003)
NT [delete] (1998)
PCS Frames (1997)
cookies and [returnraw] (1997)
WebCat2b15MacPlugin - showing [math] (1997)
WebCatalog Beta Documentation (1997)
WebCatalog2 Feature Feedback (1996)
Disappearing records (2002)
Just Testing (1997)