[aur-dev] [PATCH] Fixed a couple more lingering JSON bugs

Simo Leone simo at archlinux.org
Wed Feb 20 05:08:27 EST 2008

On Tue, Feb 19, 2008 at 01:29:50PM -0500, Loui wrote:
> On Tue, Feb 19, 2008 at 12:11 PM, eliott <eliott at cactuswax.net> wrote:
> >  Your patch adds a needless string concatenation operation, for the
> >  sole sake of a line break.
> >  Not a good idea. String concatenation adds up, peformance wise.
> Sorry I wasn't aware of that. I really hate the long lines though.
> It's a lot easier to work with code that fits neatly within a certain
> number of columns (for me). Even with the performance hit I'd probably
> still go for it. I bet there's a lot of other places that performance
> can be improved.
> I've just read something about an output buffer that sounds like it
> might increase performance for all output strings. Should we go about
> using that in the rest of the code where applicable?

I'm pretty sure eliott wants to uber-optimize the json interface because
it's very possible that this code will get hit more frequently than
any other aur code.
Generally though, I don't really see anything wrong with string
concatenation, espcially if it enhances readability (which php tends to
lack sometimes imho).

Patch applied, without string concatenation

:) zoom zoom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/aur-dev/attachments/20080220/47a6dc46/attachment.pgp>

More information about the aur-dev mailing list