Brad Hall wrote:
> On Tue, Nov 18, 2008 at 07:18:09PM -0800, Brock Pytlik wrote:
>   
>> Webrev:
>> http://cr.opensolaris.org/~bpytlik/ips-5206-v1/
>>
>> Bug:
>> http://defect.opensolaris.org/bz/show_bug.cgi?id=5206
>>
>> This addresses some of the memory use issues with the depot. The bug 
>> report contains the analysis, but in short, this begins to address the 
>> issue, but doesn't sole it entirely.
>>
>> Thanks,
>> Brock
>>     
>
> query_engine.py: (general comment)
>
>   Is there a way to re-organize search() so that both search_done() and
>   query_finished() could be removed?  It seems a little complicated that
>   the caller of search() also then has to call query_finished() ->
>   search_done().  It seems it would simplify it if search() could handle
>   the work of search_done().  Maybe I'm just missing some context.
>   
When it was returning, it was easy to know when it was done. Two things 
make this complicated. First, we switched from returning values to using 
a generator. Second, this function makes use of non-local state, 
specifically the on-disk files and the lock. This means that either the 
generator needs some way to know its done, or the caller has to make a 
second call to clean up this external state. I'll experiment with doing 
the first today, I simply don't know if it's possible given python's 
constructions, but I have an idea and I'll google some as well if it 
doesn't work

Does that at least explain why I went with this inelegant design on my 
first pass?

Brock


> Thanks,
> Brad
> _______________________________________________
> pkg-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
>   

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to