Forum

Thread tagged as: Problem, Error

Page times out when saving a region.

I have a website built in perch runway thats been running for about a year, but now I have about 300 items in this region and its really slow. It has slowed down so much that it times out and I can't really add new items.

When I turned on debuging I found out why. It looks like when perch tries to add a new item to the region, it performs 2,440 sql queries which seems excessive. It looks like the versioning system is creating a duplicate of everything instead of just updating the version number of rows that haven't changed. It also looks like this duplication is done by copying everything from database into php and then back again instead of getting the database to do the work.

Diagnostics https://fnpaste.com/PPX8

Region template https://fnpaste.com/nRJE

Debug output https://fnpaste.com/jnk8

Any ideas?

Andrew Wallace

Andrew Wallace 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

I can't view your Diagnostics Report as it requires a security hash, but if Runway has been running for about a year have you upgraded? There have been many performance enhancements over that time.

Sorry, the debug output was too big for pastebin and I had never used that one before.

Diagnostics

Region template

Debug output

The debug is 1.7mb of mostly sql queries, I think the perch version its using is from sometime in summer so ill update it today.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Yes, the first thing to do is update and confirm if the problem still exists as any advice would be for the current version.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Also, if I am reading this right you have a Region - not a collection - with 300 items?

If so you want to convert that to a Collection, Regions aren't designed for that amount of content. The whole thing is versioned as one item.