in reply to Re^4: patchable settings
in thread patchable settings

I think I've placed more emphasis (or at least tried to) on readability and reuse than what you had suggested.

Yeah style wise I agree. But there was a point to my use of that type of packing scheme. Its a lot faster and the resulting text is smaller than the current one and it renders the text less illegibile in raw form. Just avoiding the overhead of the escape call is worthy IMO. Also the scheme I used can be made a litte more dynamic and self documenting by a more verbose rewrite. I think its worth finding out the full requirements of this (ie possible charset restrictions) and getting a fast light implementation done once and for all. Settings are used a _lot_, shaving time on them is very worthwhile IMO.

But i definately like this a lot more than the earlier ideas. One last thing, can I suggest that you use == at the start of the string? What you have there is a possible valid start of a vars. '=00&' could come from { ''=>'00','1'=>'1' } for instance. I suggest '==00&' so that its impossible to occur under the current codebase.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi

    Flux8


Replies are listed 'Best First'.
Re^6: patchable settings
by ysth (Canon) on Oct 06, 2004 at 18:11 UTC
    Changed to use ==.

    Even the 100+ sub calls it is doing per page is not going to take that long, but I'll take a stab at improving it later today or Sunday.