Jump to content

Slow admin (localhost)


Peter Knight
 Share

Recommended Posts

What's the best way to diagnose this and is there anything I should be looking for? I have a Diagnostics module installed and have a few notifications about optimizing blog tables. 

9 seconds to expand one of my trees which has just 3 child pages. Saving, opening or editing a field or template takes between 5 to 9 too.

Background / tech info

The site is a duplicate of a previous site I completed so initially I wondered if there were any corrupt modules or templates etc.

Having had a check, all the original modules and templates are installed fine.

It's a 2.5.15 site running locally on PHP 5.6.2.

I know it's Friday and my Mac and I are tired but 9 seconds is taking the biscuit  ???

Link to comment
Share on other sites

@Peter

If you are talking about the DB diagnostics pages of ProcessDiagnostics then the warning about the need for optimisation is down to reclaiming wasted space in the tables - not about how fast queries will run.

Have you tried setting debug to true in your config file and looking at the timings in the foot of the offending admin page?

  • Like 2
Link to comment
Share on other sites

Yep - am talking about the admin / backend and not the front end.

I do have Debug Mode Tools enabled. If I look at the Timers accordian for example, here's my output.

These don't seem excessive and if I add them up, don't reflect the true sluggish nature of the site.

boot	0.5370 - includes all boot timers
boot.load	0.4946 - includes all boot.load timers
ProcessPageEdit.execute()	0.4698
page.children(parent_id=3, check_access=0, sort=sort)	0.2274 - 5 page(s): /processwire/page/list/ ... /processwire/page/image-crop/
boot.load.fieldgroups	0.1840
boot.load.modules	0.0718
boot.load.fields	0.0585
boot.modules.autoload.ready	0.0189
boot.load.pages	0.0181
boot.load.templates	0.0155
page.children(parent_id=22, check_access=0, sort=sort)	0.0152 - 11 page(s): /processwire/setup/template/ ... /processwire/setup/batcher/
ProcessPageView.getPage()	0.0113 - /processwire/page/edit/
page.children(parent_id=2, check_access=0, sort=sort)	0.0108 - 5 page(s): /processwire/page/ ... /processwire/blog/
boot.modules.autoload.init	0.0067
pages.get(path=/processwire/page/edit/, status<9999999)	0.0064 - 1 page(s): /processwire/page/edit/
pages.get(name=page-publish, sort=sort, parent_id=31, templates_id=5)	0.0023 - 0 page(s)
boot.load.permissions	0.0022
page.children(parent_id=28, check_access=0, sort=sort)	0.0022 - 3 page(s): /processwire/access/users/ ... /processwire/access/permissions/
boot.load.users	0.0007
boot.load.roles	0.0006
boot.load.fieldtypes	0.0005
Link to comment
Share on other sites

Ok. Anything obviously slow in the network load time graph in your browser developer tools? (I generally use Chrome or FF for this as I don't know Safari at all.)

Nothing of note.

Optimizing those blog tables seemed to have an effect and it's noticably faster now. 

  • Like 2
Link to comment
Share on other sites

Ftill looking into this. Might be next week before I can really dig in but I'll report back. 

Thanks for the great tips.

My own feeling is this is the result of cloning another localhost site and changing some hostname settings and database stuff. I've a *feeling* PW admin is hanging somewhere in the background as a result of a bad config.

Should know next week

Link to comment
Share on other sites

  • 4 weeks later...

Think I've finally gotten to the bottom of this.

MAMP Pro was using 80 , 443 and 3306 as ports for Apache, SSL and MySQL.

Setting it back to the defaults of 8888,8890 and 8889 increased speed and page refreshes from 9+ seconds to 2-3 seconds.

I also wonder if the port 80 was clashing with Skype. Just glad to have a platform I can now work on locally.  :)

  • Like 1
Link to comment
Share on other sites

Think I've finally gotten to the bottom of this.

MAMP Pro was using 80 , 443 and 3306 as ports for Apache, SSL and MySQL.

Setting it back to the defaults of 8888,8890 and 8889 increased speed and page refreshes from 9+ seconds to 2-3 seconds.

Thanks, good information to know whenever I get around to installing my copies of MAMP Pro.

Link to comment
Share on other sites

I have had this issue long time ago with a XAMPP installation on Windows. I have no idea if this will help in your specific case, but perhaps you'll give it a try.

Change in the config.php the following lines

$config->dbHost = 'localhost'; // original after a local PW installation

$config->dbHost = '127.0.0.1'; // new - just remove the line above

I figured out that resolving "localhost" on my Windows machine took about 2-3 seconds for each request. Don't know why, but using the IP instead fixed this issue. 

Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...

I was having this issue which turns out due to a bug with XDebug leaving too many files open as it wasn't closing them down properly.

AFAIK it hasn't been fixed yet.

So only turning on XDebug when you need it plus temporarily increasing the open file limits was a temporary solution that kinda works. (MAMP/ OSX)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...