← Back to team overview

phpdevshell team mailing list archive

[Bug 1023801] [NEW] PHPDS_query asWhole can be performance tuned

 

Public bug reported:

PHPDS_query's asWhole() function is called when multiple rows are
requested from the database and it returns a big array of arrays as the
result. The function is called multiple times on nearly every page. The
asWhole() function can also do extra manipulation on the data based on
the keyField and focus optional parameters. However, both the KeyField
and focus options are used in very rare occasions within PHPDevshell
itself, yet, a number of unnecessary assignments and conditional checks
are performed on each row of the result set regardless of the KeyField
and focus options.

This function can be optimised by first checking whether the keyField or
focus parameter is set. If none of the two parameters is set it can then
loop through the result set much more efficiently.

** Affects: phpdevshell
     Importance: High
     Assignee: Don Schoeman (don.sch)
         Status: New


** Tags: aswhole

-- 
You received this bug notification because you are a member of
PHPDevShell, which is subscribed to PHPDevShell.
https://bugs.launchpad.net/bugs/1023801

Title:
  PHPDS_query asWhole can be performance tuned

Status in Open Source PHP RAD Framework with UI.:
  New

Bug description:
  PHPDS_query's asWhole() function is called when multiple rows are
  requested from the database and it returns a big array of arrays as
  the result. The function is called multiple times on nearly every
  page. The asWhole() function can also do extra manipulation on the
  data based on the keyField and focus optional parameters. However,
  both the KeyField and focus options are used in very rare occasions
  within PHPDevshell itself, yet, a number of unnecessary assignments
  and conditional checks are performed on each row of the result set
  regardless of the KeyField and focus options.

  This function can be optimised by first checking whether the keyField
  or focus parameter is set. If none of the two parameters is set it can
  then loop through the result set much more efficiently.

To manage notifications about this bug go to:
https://bugs.launchpad.net/phpdevshell/+bug/1023801/+subscriptions


Follow ups

References