[Rpm-maint] [PATCH] Improve macro table performance
Panu Matilainen
pmatilai at laiskiainen.org
Fri Mar 22 07:14:21 UTC 2013
Hi,
On 02/13/2013 08:34 PM, Alexey Tourbin wrote:
> On Wed, Feb 13, 2013 at 12:59:02PM +0200, Panu Matilainen wrote:
>> So, please split it into two parts:
>> - one to eliminate qsort() + bsearch()
>> - one to change the macro entry allocation (and see above)
>
> I'll recheck if it is possible to separate the data structure and the
> allocation logic, but it seems that it is not, since the data structure
> and the allocation are now tightly coupled. The skeleton of addMacro()
> now looks like this:
>
> findEntry
> if (found)
> allocate entry with shared name
> else
> prepare slot
> allocate entry with flexible name
> allocate/initialize the rest
> insert into the slot
>
> If it is not possible to produce two patches that commute (i.e. can be
> applied in any order), it is probably best to go with a single patch.
Haven't heard you in a while so checking on the status: in this
particular case I care more about the performance win (which also cleans
up the code) than having it split no-matter-how-hard.
In other words, I'd rather just apply the patch and get on with other
things, but if you have already put significant effort into splitting
the thing and/or are close to sending the patches I dont want to make
that effort go wasted.
So please let me know whether you're working on it or if its okay for me
to just apply the original patch.
- Panu -
More information about the Rpm-maint
mailing list