| Comment | File | Size | Author |
|---|---|---|---|
| #2 | performance-2653230-2.patch | 1.19 KB | joelpittet |
| XHProf__Hierarchical_Profiler_Report.png | 228.16 KB | joelpittet |
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | performance-2653230-2.patch | 1.19 KB | joelpittet |
| XHProf__Hierarchical_Profiler_Report.png | 228.16 KB | joelpittet |
Comments
Comment #2
joelpittetTagged with commerce sprint because this is a dependency of commerce_reports.
Comment #3
zany commentedComment #4
zany commentedI'm happy to rely on `isset()`. It's nicer to look at than `is_array() && array_key_exists()`. Didn't know that it can check nested structures.
Also you got rid of the aliasing in the loop. Is that about performance too, or just personal taste? I'd think it should have worse performance now. But then again it's never so simple.
Comment #5
joelpittet@zany my thought on removing the references was that it won't have to set the reference in the loop, though I hardly think that would make or break the patch, the big fix is isset() from is_array() checks.
Quick show of how that will not produce errors:
https://3v4l.org/J2pcc
It would only produce errors I think if field was ever an object... maybe
Comment #6
zany commentedThanks.
Comment #7
joelpittetThank you @zany for replying so quick. Any chance the patch wasn't pushed?
Comment #8
zany commentedI do see it here: http://cgit.drupalcode.org/views_date_format_sql
There is no new release ATM though and the branch is named master not 7.x-3.x like you'd expect.
Comment #9
joelpittetAh i see, thanks. Normally the bot picks up the commit and shows it here. Caught me off guard.
Any chance you could open a dev branch & release for this module?
Comment #10
zany commentedThe change was simple enough and I went straight to release:)
Comment #11
joelpittetLet's undo the reference change I made:) I was curious about the performance impact about that too from your question.
Results:
Comment #12
zany commentedGreat to see that you did such a thorough analysis. Usually I'm obsessed about those details too, but I hadn't much time to mess with PHP lately.
Comment #13
joelpittetI go in bouts of performance testing:-)
Comment #14
joelpittetWant me to propose an interdiff or new patch for master or can you take care of that @zany?
Comment #15
zany commentedThe switch is in http://cgit.drupalcode.org/views_date_format_sql/commit/?id=7458552 and the release 7.x-3.3 was packaged quite quickly for me. Maybe some CDN issue.