Ticket #1134 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

CMF allowedContentTypes is too slow

Reported by: bdelbosc Owned by: bdelbosc
Priority: P2 Milestone: CPS 3.4.0
Component: CPSWorkflow Version: 3.3.8
Severity: normal Keywords: tuning
Cc:

Description

WorkflowTool?.getAllowedContentTypes is too slow

It tooks 0.35s on my computer and slows down the folder factory page in the getSortedContentType script.

Change History

comment:1 Changed 14 years ago by jmorliaguet

this one requires some sort of cache (the slowness comes from CMF). The "Add item portlet" for instance caches the list of items that can be created in a folder based on:

  • the portal type of the current folder (corresponds to a list of items that can be added according to CMF)
  • the items that can be added according to the 'create' workflow (CPS-specific)

so you have a cache key based on a (portal_type, types_allowed_by_wf) discriminator.

comment:2 Changed 14 years ago by bdelbosc

  • Priority changed from P1 to P2

in fact most of the time is spent in the CMFCore PortalFolder?.allowedContentTypes, the backward compatibility of TypeInformation?.allowType is very slow.

I will add a patch in CPSCompat to remove this unused backward compatibility.

comment:3 Changed 14 years ago by bdelbosc

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from WorkflowTool.getAllowedContentTypes is too slow to CMF allowedContentTypes is too slow

[29554] makes PortalFolder?.allowedContentTypes 10 time faster

Note: See TracTickets for help on using tickets.