473,226 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

Performance -- Eval vs Include

For those of you that have tested eval() vs. including a file many times,
I'd appreciate your comments on which one is better for performance.
My application will have a queue like routine in which I may have to include
a file many time. The file will contain a series of switch/case statements.
Depending on specified criteria, this file will need to be processed from
one time up to X times. I am not really worried about the usual case where
the file will be included less than 3-5 times in one request, however, above
that I have to wonder where to save on performance.

Those of you writing parsers are probably moreso in the know on this one,
however, anyone else that has a clue please feel free to add your 2c.

Thanks,

-Laidbak
Jul 17 '05 #1
2 4288
*/hack/* wrote:
For those of you that have tested eval() vs. including a file many times,
I'd appreciate your comments on which one is better for performance.
My application will have a queue like routine in which I may have to include
a file many time. The file will contain a series of switch/case statements.
Depending on specified criteria, this file will need to be processed from
one time up to X times. I am not really worried about the usual case where
the file will be included less than 3-5 times in one request, however, above
that I have to wonder where to save on performance.

Those of you writing parsers are probably moreso in the know on this one,
however, anyone else that has a clue please feel free to add your 2c.

Thanks,

-Laidbak

file operations are expensive - keep them to a minimum, mind you so is
eval. Sounds like a design problem
Jul 17 '05 #2
.oO(*/hack/*)
For those of you that have tested eval() vs. including a file many times,
I'd appreciate your comments on which one is better for performance.
I try to avoid eval() whenever possible. Sometimes it may look like the
most simple solution, but in most cases there's a much better and faster
way to do something.
My application will have a queue like routine in which I may have to include
a file many time.


The same file? Sounds bad. Including a file _one_ time is more than
enough. Consider to use functions.

Micha
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon | last post by:
Am using the following code. <script language="JavaScript1.2"> function setquantity(productindex,productquantity) { //create the reference object irefname_none = eval("document." +...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
0
by: Don Pedro | last post by:
According to the documentation for the DataBinder class's Eval method should it only be used with discretion due to the fact it is latebound and uses reflection. "CAUTION Since this method...
1
by: meir | last post by:
i have 2 general questions about performance: 1. i heard that using <%# databinder.eval(....)%> will effect the performance and i wanted to know it that's corrent. 2. also about performance -...
1
by: DBLWizard | last post by:
Howdy All, I was reading an older posting about the performance hit of DataBinder.Eval. ...
13
by: Stephen Kay | last post by:
Is there a way to redirect every single page on an existing web site through a php function? In other words, say I have a whole functional HTML web site, never written to use any php. Now I...
4
by: Jon Slaughter | last post by:
I'm using eval to excute some mixed php and html code but I cannot debug it. I am essentially using filegetcontents to load up a php/html file and then inserting it into another php/html file and...
0
by: Shades799 | last post by:
Hi All, I was wondering if any of you could help me with a very difficult problem that I am having. I have an ASP site that works with an Oracle database using an ADODB connection. This...
1
by: bizt | last post by:
Hi, Im currently looking to move into using JSON for AJAX instead of returning from the server a string like the following: 12345{This is a text string{true I prefer objects because I dont...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.