Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance with CustomTags 2

Status
Not open for further replies.

ChiefJoseph

Programmer
Feb 16, 2001
44
US
Doe's anyone know if you loose a lot of performance time when you use a lot of Custom tags?
 
Hey ChiefJoseph,


Actaully I have heard that custom tags improve performance in most cases. I haven't had the time, or a reason, to test that but that's what I've heard.

Have fun...
 
Hey tlhawkins,

So, how often do you use custom tags? I'm running into a CF programming technique problem. Is it better to write long CF scripts or modularize “specific tasks” into custom tags. I realize that this probably depends how often your using that “specific task” but do you have a rule of thumb?

Thanks a ton.
 
A CFINCLUDE will run (marginally) faster than a "Custom Tag"

Of course, for the sake of a couple microseconds, go for readability... In the long run code that is easily understood (next year when you are upgrading) will save more than than a few microseconds :)

I tend to use custom tags for:
a) code I know I am going to be using in many apps down the road.
b)code that lends itself to modularization.

An example: A shopping cart. You know that you are going to re-use this code later. You also know that it is easier to "pass" a value and an action to a custom tag than it is to CFINCLUDE all the related code.

A good "CustomTag" should meet "both" of those criteria.

PS. This is a *somewhat personal opinion. Your mileage may vary :)
 
Hey CheifJoseph,

I use CutsomTags as little as possible actually. I only use them in cases similar to those mentioned by CFHUB. I would suggest using the more modular scripts rather then writing long ones that do an entire job because of debugging and re-use issues.

Hope our opinions can help.
 
Thanks guys,
its hard to learn good programming techniques if your not in a group of programmers...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top