Welcome Guest, Not a member yet? Register   Sign In
What is a reasonable execution time?
#1

[eluser]Madmartigan1[/eluser]
What is the limit on what is considered a fast or reasonable execution time?

I know it's relative, but what would be the maximum average time you'd be willing to accept per page load, provided that your app is working pretty hard?

When load time gets to be too much, where do you look first to optimize?
#2

[eluser]Pschilly[/eluser]
First look would be Database queries I'd say... But could be different depending on app.
#3

[eluser]pickupman[/eluser]
A 3-4 sec time maybe acceptable. If is something internal, this could be a little longer, but a public website better starting loading within that time frame or people will leave your site. CI has a decent profile library to help track down slow downs. You can also you xdebug + cachegrind to find out more detailed information.

As mentioned above, DB can be is typically the first point to look. Try using:
Code:
$this->output->enable_profiler(TRUE);

This will append some handy information to the page about load times and queries. Sometimes the page load is the connection, but CI execution time would be important to look at. Also take a look at Phil Sturgeon's Cache library. You can partial cache anything from a model or library.
#4

[eluser]skunkbad[/eluser]
[quote author="Madmartigan1" date="1292727952"]What is the limit on what is considered a fast or reasonable execution time?

I know it's relative, but what would be the maximum average time you'd be willing to accept per page load, provided that your app is working pretty hard?

When load time gets to be too much, where do you look first to optimize?[/quote]

The max reasonable execution time is really relative to how important the site visitor feels the page loading is worth. For instance, it is just a blog vs a bank account. The visitor of the blog may just be trying to read for fun, and may not want to wait around, but the visitor of the bank account needs to see what is there regardless of how long it takes to load.

I have a fiber optic connection to the internet, so I am used to pages loading almost instantly. If I'm just browsing the internet, and a page takes longer than about 5 seconds, I might click the back button.
#5

[eluser]Madmartigan1[/eluser]
Well in my case, this is for a simple CMS. I added thousands of users/articles/nav_items etc. just to see how it would preform, and most of the execution time was eaten up by db queries. I saw some things I could optimize, and got the execution time to about 0.5 seconds on one of the heavier pages, which to me felt a bit slow, especially for ajax calls (which pretty much need to load as much CI stuff as any other "page"). I don't bother caching queries in this situation because I end up deleting the cache with nearly every action taken. I'm feeling now like .5 seconds is not that bad at all based on what you all say.

Of course execution time !== real page load time.

What would you guys say typically eats up the most "real page load time" on the front end, and what are some of the ways you try to reduce it? Background sprites? Lazy-loading ajax content or images? Css/js compressors?
#6

[eluser]John_Betong[/eluser]
http://www.askapache.com/htaccess/apache...mains.html

Interesting technique discussed on the above link about using subdomains for storing images, CSS, JavaScript files. I did try it and used the following link to monitor progress. I did not see a tremendous difference.

http://pingdom.com/

Another relevant site I stumbled upon:

http://push2check.com/

May we see the link to your site?
 
 
 
#7

[eluser]Madmartigan1[/eluser]
Thanks for those links, I will check that out. I've heard of doing that before.
Unfortunately the site is not live yet or else I would share it.
#8

[eluser]tonanbarbarian[/eluser]
execution time in the webserver / CI is different from the actual page load time
I have seen and even built sites that have page execution times of 0.5 seconds or less but due to the amount of images, css etc that is loaded on the page the load time can be 2+ seconds.

Page loads are more dependant on the client setup

As for execution times, if my execution time in PHP is more than 1 seconds there is some work that needs to be done.
Query optimisation is always the first place to start as has been mentioned above.
Also always look and see if you are retrieve data in multiple queries that could be retrieved in just one
The number of times I have seen code where a recordset will be loaded from one table and then that recordset is processed in a loop. On each loop pass the code with then run 1 or more queries to load related data from another table, rather than just writing 1 query in the first instance that joins the necessary tables.

For your ajax code you need to determine if the execution time is too high, or the time for the browser to process the javascript of the ajax request is what is taking up the extra time.
And try where possible to send the minimal data necessary via ajax.

Just my thoughts
#9

[eluser]Unknown[/eluser]
well wht i really feel tht ,,thn i jst close tht site cos now a days no one has time to wait for long,,,so i suggest tht if the execution time less it gone be fit,,,
#10

[eluser]smilie[/eluser]
Hm, everybody goes like: 2 or 3 seconds I would wait...

I would live to see a script that would convert video of 100+ MB in 2-3 seconds :-)

As TS said: it is CMS.
For CMS page load (user experience) should not be more then 2-3 seconds - I agree.
However, if user in CMS uploads a 250MB movie, which then needs to be converted - exec time of couple of minutes would be reasonable Smile

Regarding perfomance check - Firebug + page speed does wonders as well :-)

Cheers,
Smilie




Theme © iAndrew 2016 - Forum software by © MyBB