6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/18/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#6198] One loop less
*
Your Email Address
*
Spam protection
Enter the letters below:
. .._.._..___. . | | | | [__ |__| |/\|_|__|_| | |
Comment
>> - Don't use SELECT * > > > > What's the rationale for this? In this case we actually do want all > the columns. Is there a performance issue with '*' vs putting all the > column names in the query explicitly? > > > >> - Combine the fetchAll db driver with the loop that creates >> galleries objects > > > > I don't see how this is reducing the number of loops, your just > replacing a for loop for a while loop from what I can tell. Also, > with your change we're no longer catching any errors that the > ->fetchAll() (->fetchRow() in your version) call can return. > > > >> - As all fields are prefixed with "gallery_id" don't str_replace but > >> use substr(), is faster > > > > Agreed, thanks. > > > >> - countGalleries caches results but never returns it if recalled, as > >> this was not noticed till now I guess that is never recalled so > >> remove the parameters serialization > > > > Yea, I thought I already took that out after I realised that we very > rarely need to obtain the count for the same gallery more than once > per page load. Thanks for catching that. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers