Ticket #1688 (new defect)

Opened 1 year ago

Last modified 8 months ago

Optimization: front-page

Reported by: jukka Assigned to: anonymous
Priority: postponed Milestone:
Component: generic Version:
Keywords: optimizing Cc:
Time spent: Time remaining:
Time planned:

Description

Here, ignore the 'path: story' -- it is already fixed, but we forgot to remove the custom front-page, which was still using expensive story calls.

The problem is globalize. For some users it has been 20-60s waits, for some 0.0n. Maybe it is worst in front-page, because front-page is located at the root of the portal, so basically it has access to all of the content and if there is something inside globalize that wants to go to subdirectories and do stuff there, it will be slowest here. Unfortunately, these slow moments are rare: once the user/zope? has globalize set, it becomes fast again.

The globalize is located in CMFPlone/browser/plone.py

It goes through lots of tool initializations, most notably portal_workflow and portal_actions. For those we already have done something. You need to set up timetraps like this:

import time

a= time.time()

(some code that you want to measure)

print 'Time at point (1): %s' % str(time.time()-a)

Find out what parts in globalize cause the problems. There may be some that are a bit slow in general, but there is still something huge that you only get sometimes.

Total rendering time for page template	400.62	95	4.21705
All expressions	392.97	28820	0.0136
path: plone_view/globalize	213.72	95	2.24968
path: story	122.3	285	0.42912
python: here.lemill_tool.getStoryCandidate()	50.31	95	0.52958
string: ${ltool/absolute_url}/giveLanguageLink?lang=$lang&url=${request/URL}&param=$qstr	0.68	1235	0.00055
python: here.portal_css.getEvaluatedResources(here)	0.62	95	0.00653
path: story/getBlurp	0.53	95	0.00558

Change History

01/18/08 15:23:50 changed by pjotr

Setting right_slots and document_action_slots to empty for Section folders seems to be helpful. The total time spent on globalize seems to have droped to somewhat reasonable amounts. (1.1xxx before and 0.54xxx and 0.02xxx after the first load - for front-page; 0.11xxx for our section front-pages and 0.02xxx after the first load)

I wonder if we could get rid of some actions. There are some that can just be set to invisible, but getting rid of them might better (the prefetching method would not neex to go through all the actions that are unused anyway). ???

01/18/08 15:29:56 changed by jukka

Actions provided by portal_types at least need some automated treatment, there are too many of them to check out manually. Otherwise checking them invisible excludes action from any later processing and going through that is very fast. We should see how archetypes set default actions for new types and change our types to not create any actions.

05/12/08 17:13:18 changed by jukka

  • priority changed from critical to postponed.

We'll return to this later. Front page is no longer a problem.