?

User tests: Successful: Unsuccessful:

avatar gjedeer
gjedeer
26 Oct 2015

I'm working on improving performance of a Joomla site. I noticed that the longest part of generating a page is JApplicationCms->getMenu(). The query returns 380 menu items, each of them with a larger than usually params column (some extension). JApplicationCms took 1.78s to execute, out of which 1.37s has been spent in 489 calls of Registry::bindData.

Essentially, for menu items, the flow is as following:

  • JMenu loads data rows, params is a JSON string
  • JRegistry loadString() converts this string to an object
  • JRegistry bindData() converts that object to an array
  • JRegistry bindData() creates a new object, iterates over the array and copies keys as object properties
  • The newly created object is returned

I propose that for simple cases like loading a menu item, the flow looks like this:

  • JMenu loads data rows, params is a JSON string
  • JRegistry loadString() converts this string to an object
  • The object is returned

After my changes, said site takes 0.21s to execute JApplicationCms->getMenu().

avatar gjedeer gjedeer - open - 26 Oct 2015
avatar gjedeer gjedeer - change - 26 Oct 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2015
Labels Added: ?
avatar joomla-cms-bot
joomla-cms-bot - comment - 26 Oct 2015

Pull requests to the master branch of this repo are not accepted. Please close this pull request and submit a new one against the staging branch.
This is an automated message from the J!Tracker Application.

avatar gjedeer gjedeer - change - 26 Oct 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-10-26 17:22:55
Closed_By gjedeer
avatar gjedeer gjedeer - close - 26 Oct 2015

Add a Comment

Login with GitHub to post a comment