Ticket #6595 (closed Bug: fixed)

Opened 5 years ago

Last modified 3 years ago

createObject + portal_factory calls invokeFactory twice

Reported by: nouri Owned by: alecm
Priority: major Milestone: 2.5.4
Component: Infrastructure Keywords:
Cc:

Description

Because of how the createObject.cpy script is written, it will call invokeFactory twice. Once for the orginal request to 'createObject', and once for the URL where it's redirecting to (see 'createObject.cpy.metadata'), like: .../portal_factory/Document/document.2007-05-16.8972038581/edit

invokeFactory takes 0.5 seconds on my instance. By converting the 'createObject' script to a conventional Python script and just doing a redirect in case portal_factory is used, I was able to save those 0.5 seconds, which makes a *huge* difference in user experience.

Attachments

createObject.py Download (1.3 KB) - added by nouri 5 years ago.
My sketchy createObject.py

Change History

Changed 5 years ago by nouri

My sketchy createObject.py

comment:1 Changed 5 years ago by hannosch

  • Owner changed from somebody to alecm
  • Component changed from Unknown to Content Types

comment:2 Changed 5 years ago by alecm

  • Status changed from new to closed
  • Resolution set to fixed

(In [15053]) No longer call invokeFactory twice in createObject. Fixes #6595

comment:3 Changed 3 years ago by hannosch

  • Component changed from Content Types to Infrastructure
Note: See TracTickets for help on using tickets.