Webmastersite.net
Register Log In

Speed increase in 5.0.22
Wow

Comments on Speed increase in 5.0.22

fusionx
Experienced

Usergroup: Customer
Joined: Jun 18, 2008

Total Topics: 22
Total Comments: 85
fusionx
Posted Nov 24, 2008 - 7:45 AM:

What did you do? I noticed there was a cache fix and a "speed increase" listed in the update details.

On my server, the speed increase is amazing. I just upgraded, and haven't had time to look at the server closely, but from the front end, it's a huge increase in speed.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 24, 2008 - 10:20 PM:

At the end of each page rendering, all setting and switch template variables are replaced in the page. Since it's a big block of text, each scan of it is expensive. Previously, it looped over all possible settings and switches to str_replace their template variables. Now, it does a regular expression search to see what template variables are in the page and only processes what it knows is being used.

I'll test applying the method to the other template variables soon (the objectreplacements function is a bit more complex), but I don't think the impact for those will be as significant since they're done on smaller blocks of text.


The cache fix didn't involve speed. There was a scenario (I forget the details) in which the cache would attempt to delete a file that didn't exist, causing an error to display... I took care of it so the error doesn't display.
fusionx
Experienced

Usergroup: Customer
Joined: Jun 18, 2008

Total Topics: 22
Total Comments: 85
fusionx
Posted Nov 25, 2008 - 6:46 PM:

The regex seems to have made a huge difference. I've stripped out a lot of the switch decision code, knowing that I'll never use certain things. It makes great sense that only checking for what is actually present in the code would speed things up a lot.

In fact, I'm going to go back through my templates and remove anything I skipped over the first time through. If I need them later, I'll put them back in smiling face

Thanks Paul!
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 26, 2008 - 1:40 AM:

Well I wish mine was! I am still having speed issues, but not all the time. Mainly in the morning, like now (GMT time). For instance...

23 total queries
This page was created in 5.03 seconds
Memory used: 6084512 bytes
Server Status: time since last reboot is 9 days, 22:03, load average: 1.48, 1.77, 1.91

And yet later on that page will load in less than a second easily. Frustrating sad
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 26, 2008 - 4:39 PM:

fusionx wrote:
In fact, I'm going to go back through my templates and remove anything I skipped over the first time through.


That'll make no difference. In my tests, the old settingsreplacements took 0.20 seconds and the new method takes 0.01 seconds on the standard templates. No matter how much you remove, it'll still take 0.00-0.01 seconds (probably 0.01 because I still have a loop in there for the function variables, which I'll look into removing later).
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Dec 02, 2008 - 3:39 AM:

well as for front speed i have no problems but from the backend its very slow.

i cant make it any better.

when someone submits a link that i have to verify i click approve/go and then it takes between 30 and 40 seconds untill the page says done...

96391 links
16 categories
11046 subcategories
anything i can shutdown to increase that ?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 03, 2008 - 5:42 AM:

How many listings are you approving at once? I've never noticed anything slow about it.
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Dec 03, 2008 - 8:57 AM:

submissions and approving are one at a time paul.
so thats not much... sad
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.