[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PSPP-BUG: [bug #24502] In variable view, variables cannot be inserted at

From: Ben Pfaff
Subject: PSPP-BUG: [bug #24502] In variable view, variables cannot be inserted at arbitrary positions
Date: Mon, 27 Oct 2008 16:40:54 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061205 Iceweasel/ (Debian-

Follow-up Comment #2, bug #24502 (project pspp):

>Inserting variables anywhere except at the end however is going to
>be a problematic when there are a large number of variables, 
>because the implementation of src/data/dictionary.c doesn't really
>support inserting/deleting at arbitrary positions. Like the
>comment to dict_reorder_var says, it runs in linear time.
>Would it be possible to reimplement dictionary.c using
>src/libpspp/abt.c ?? This would make insertions/deletions run in 
>O(log n). 

We are talking about inserting a variable into a dictionary at user request,
right?  In that case it should be completely unnecessary to make anything
faster.  Even if it takes 100 ms to reorder the dictionary (and it won't for
less than many thousands of variables) then the user will never notice the
delay.  And switching to abt would slow down everything that looks up a
variable by index, so I don't think it's a good tradeoff.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]