Re: Speeding up my [showif] performance

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23012
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.Ken you forgot one...or one that I have never tried...you like to experiment. I was planning to give this a go this weekend, but you can save me a few minutes of testing... :]ever try this one? [include file=header.inc]a bunch of webdna and html[include file=footer.inc] And in the header.inc[hideif [browser]^emailsiphon] and in the footer.inc[/hideif]Easy to test, but I figured you already tested it :]meaning a global show and hide from within a pair of included files. Edit one place, use everywhere. Would be a cool trick if it works to hose certain spiders. My active dna test server is across town. =============================================== Gary Richter PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com =============================================== Associated Messages, from the most recent to the oldest:

    
  1. Re: Speeding up my [showif] performance (Kenneth Grome 1999)
  2. Re: Speeding up my [showif] performance (PCS Technical Support 1999)
  3. Re: Speeding up my [showif] performance (Gary Richter 1999)
  4. Speeding up my [showif] performance (Kenneth Grome 1999)
>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.Ken you forgot one...or one that I have never tried...you like to experiment. I was planning to give this a go this weekend, but you can save me a few minutes of testing... :]ever try this one? [include file=header.inc]a bunch of webdna and html[include file=footer.inc] And in the header.inc[hideif [browser]^emailsiphon] and in the footer.inc[/hideif]Easy to test, but I figured you already tested it :]meaning a global show and hide from within a pair of included files. Edit one place, use everywhere. Would be a cool trick if it works to hose certain spiders. My active dna test server is across town. =============================================== Gary Richter PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com =============================================== Gary Richter

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:

Stumped on ShowNext -using variables (1997) Date Question (2002) Still having install problems (2000) Multiple database search (2000) Multiple Merchant Accounts? (1997) WebMerchant Only reads 1.4 order files error (1997) More on ShippingCost help needed (1998) Off Topic: Help Wanted (1997) multiple credit card merchant accounts/processors (1997) Almost a there but..bye bye NetCloak (1997) What am I missing (1997) WebCatalog Technical Reference (1997) exclamation mark... (1999) Search returns all, not 20 (1997) two of the same named db's open at once (1998) To use GREP to boldface text (2003) PCS Frames (1997) How to Display text in empty fields (1997) Strange Search Results (2004) WebCat2 Append problem (B14Macacgi) (1997)