Speeding up my [showif] performance
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23010
interpreted = N
texte = Inside a showif context, I have a choice of at least three options. When the webdna code inside the showif is used only in this template, I use Option#1. If the code gets used in more than one template, I use Option#2. I very seldom use Option#3, but there's no reason why I couldn't ...Option #1 - direct code entry:[showif [x]=y]my webdna code goes here, directly in the template ...[/showif]Option #2 - store the code in an include file:[showif [x]=y][include fileWithMyCodeInIt][/showif]Option #3 - store the code in a db:[showif [x]=y][interpret][lookup ... fieldWithMyCodeInIt][/interpret][/showif]My questions (for PCS) are:1- Which option is fastest, second-fastest, and slowest?2- Does the answer to #1 depend on how the showif evaluates?I think Option#2 would be fastest when the showif evaluates to false, because I'm assuming that webcat parses the least amount of code in this example, and it does not parse the code inside the include file. Is this correct?But if the showif is true, then Option#1 should be fastest, because the code that needs to be interpreted is already there, inside the showif itself, so webcat doesn't have to perform any extra steps to include it from a separate file or to look it up it in a db file.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
Inside a showif context, I have a choice of at least three options. When the webdna code inside the showif is used only in this template, I use Option#1. If the code gets used in more than one template, I use Option#2. I very seldom use Option#3, but there's no reason why I couldn't ...Option #1 - direct code entry:[showif [x]=y]my webdna code goes here, directly in the template ...[/showif]Option #2 - store the code in an include file:[showif [x]=y][include fileWithMyCodeInIt][/showif]Option #3 - store the code in a db:[showif [x]=y]
[interpret][lookup ... fieldWithMyCodeInIt][/interpret][/showif]My questions (for PCS) are:1- Which option is fastest, second-fastest, and slowest?2- Does the answer to #1 depend on how the showif evaluates?I think Option#2 would be fastest when the showif evaluates to false, because I'm assuming that webcat parses the least amount of code in this example, and it does not parse the code inside the include file. Is this correct?But if the showif is true, then Option#1 should be fastest, because the code that needs to be interpreted is already there, inside the showif itself, so webcat doesn't have to perform any extra steps to include it from a separate file or to look it up it in a db file.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
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:
Mac/network guy needed in Seattle (2004)
Store setup questions (2000)
[WebDNA] Not even sure what to ask for help on. . . :( (2008)
searchable list archive (1997)
Off-Topic: Automatic FTP scripts for OSX (2003)
semi OT: EditPlus2 WebDNA Keywords and syntax coloring (2002)
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
Error Lob.db records error message not name (1997)
Kaaaaahhhhhhhnnnnnnn! (1997)
WebDelivery: One step closer !! (1997)
WebCat2 beta 11 - new prefs ... (1997)
Formatting date to number (2000)
Emailer Set Up (1997)
webcat 2.1 (1997)
Summing fields (1997)
PSC recommends what date format yr 2000??? (1997)
show all problem (1997)
MasterCounter Help (1998)
5.0 tips etc (2003)
File perms (2002)