Closed gnugat closed 6 years ago
Thanks for reporting, that worth an optimisation. I will inspect this issue.
Good job @gnugat , please correct
$no = pg_field_num($this->handler, "\"$name\""));
by
$no = pg_field_num($this->handler, "\"$name\"");
Good catch @stood, it's now fixed.
I've profiled an application with a SQL query that returns tons of fields, and Blackfire flagged the
ResultHandler->getFieldNumber
as a performance bottleneck. It was called 12 078 times, and 98% of the time spent on method was due to a call onsprintf
. Doing a concatenation instead solved that specific bottleneck.Here's the profiler graph:
.
Do you think the change is worth it?