ryancramerdesign / ProcessWire

Our repository has moved to https://github.com/processwire – please head there for the latest version.
https://processwire.com
Other
727 stars 198 forks source link

Page load performance (Localhost, Windows) #838

Open klor opened 9 years ago

klor commented 9 years ago

Is page load performance being considered for 2.5.11 dev?

The reason I am asking is because I have Pages that load very slowly in the editing interface. http://localhost/foo/processwire/page/edit/?id=1001

One page has 27 requests, 543 KB, loads in 24.98 seconds (not unusual load performance). The most time-consuming requests for this page are:

The Page Template has 30 fields, including:

More page load examples:

Loading Pages - 7.68 s. Loading a Basic Page - 14.08 s.

The computer uses Windows 8.1 x64 with 4 GB RAM, runs on a WAMP Server installation.

ryancramerdesign commented 9 years ago

That sounds exceptionally slow. How are you able to even use that? :) Have you tried a reboot? I've never heard of a 25 second page load time even on a template with hundreds of fields, so it sounds like there is some major bottleneck somewhere there. I have no idea what it could be, as I've never seen anything like that. Typical load time for the page editor is under 500ms. At least that's what I see here, on my 2008 mac that I use for development. Most servers PW is deployed to have significantly more horsepower than my old computer. It sounds like you are adding up client side times there too, so double check that your browser cache is functional too... though that probably doesn't matter much of it's localhost. Definitely something not right there, let me know if you track down whatever the bottleneck is.

You might also enable debug mode and look at the Debug Info section in the bottom of the admin screen and the part under "Timers". That can sometimes help to identify bottlenecks. Another thing to check is what 3rd party modules are installed. Some modules are "autoload" which means they load on every request, and it's always good to look at what those are doing too.

horst-n commented 9 years ago

Have you read (and tried) this: https://processwire.com/talk/topic/8320-local-dev-server-running-slow-this-may-be-of-help/

teppokoivula commented 9 years ago

Another thing to check is Xdebug: https://processwire.com/talk/topic/8625-xdebug-slowing-things-down-considerably-wampserver/.

klor commented 9 years ago

I reconfigured Wamp server and deactivated XDebug. I use Firefox with cache enabled, according to about:config => browser.cache that uses default values. In Processwire, all 3rd party modules are now disabled (only "Import Pages From CSV" was used).

Page load times are now:

ProcessWire debug mode, Timer results are:

Timers - Loading Pages

boot - 0.3716 - includes all boot timers
boot.load - 0.3278 - includes all boot.load timers
boot.load.modules - 0.1083
boot.load.fields - 0.0793
boot.load.fieldgroups - 0.0425
page.children(parent_id=2, check_access=0, sort=sort) - 0.0292 - 4 page(s): /processwire/page/ ... /processwire/access/
page.children(parent_id=22, check_access=0, sort=sort) - 0.0263 - 2 page(s): /processwire/setup/template/ ... /processwire/setup/field/
boot.load.pages - 0.0245
page.children(parent_id=3, check_access=0, sort=sort) - 0.0213 - 3 page(s): /processwire/page/list/ ... /processwire/page/recent-pages/
boot.modules.autoload.ready - 0.0173
ProcessPageView.getPage() - 0.0150 - /processwire/page/
boot.load.templates - 0.0102
ProcessPageList.execute() - 0.0087
pages.get(path=/processwire/page/, status<9999999) - 0.0069 - 1 page(s): /processwire/page/
page.children(parent_id=28, check_access=0, sort=sort) - 0.0055 - 3 page(s): /processwire/access/users/ ... /processwire/access/permissions/
pages.get(id=1, status<9999999) - 0.0045 - 1 page(s): /
boot.modules.autoload.init - 0.0030
boot.load.permissions - 0.0030
boot.load.roles - 0.0011
boot.load.users - 0.0011
boot.load.fieldtypes - 0.0007

Timers - Loading a Page 4.47s (according to Firefox Web Developer extension)

ProcessPageEdit.execute() - 0.4158
boot - 0.3971 - includes all boot timers
boot.load - 0.3526 - includes all boot.load timers
boot.load.modules - 0.1011
boot.load.fields - 0.0873
boot.load.fieldgroups - 0.0554
pages.find(templates_id=43, check_access=0, status<2048) - 0.0492 - 18 page(s): /foo/bar/ ... /foo/baz/
page.children(parent_id=2, check_access=0, sort=sort) - 0.0278 - 4 page(s): /processwire/page/ ... /processwire/access/
page.children(parent_id=22, check_access=0, sort=sort) - 0.0269 - 2 page(s): /processwire/setup/template/ ... /processwire/setup/field/
page.children(parent_id=3, check_access=0, sort=sort) - 0.0249 - 3 page(s): /processwire/page/list/ ... /processwire/page/recent-pages/
ProcessPageView.getPage() - 0.0182 - /processwire/page/edit/
boot.load.pages - 0.0179
boot.modules.autoload.ready - 0.0144
boot.load.templates - 0.0115
pages.get(path=/processwire/page/edit/, status<9999999) - 0.0111 - 1 page(s): /processwire/page/edit/
page.children(parent_id=28, check_access=0, sort=sort) - 0.0055 - 3 page(s): /processwire/access/users/ ... /processwire/access/permissions/
pages.get(name=page-publish, sort=sort, parent_id=31, template=permission) - 0.0034 - 0 page(s)
boot.modules.autoload.init - 0.0030
pages.get(id=1072, status<9999999) - 0.0028 - 1 page(s): /foo/bar/
boot.load.permissions - 0.0022
boot.load.users - 0.0012
boot.load.roles - 0.0010
boot.load.fieldtypes - 0.0005
isellsoap commented 8 years ago

@klor Can this issue be closed?