bugPSPP - Bugs: bug #24502, In variable view, variables cannot...

 
 

bug #24502: In variable view, variables cannot be inserted at arbitrary positions

Submitter:  John Darrington <jmd>
Submitted:  Thu 09 Oct 2008 08:30:16 AM UTC
   
 
Category:  Graphical User Interface Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  Before 0.8.0
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 Dec 2008 10:52:45 AM UTC, comment #4: 

This is fixed in the latest "master" repository.

John Darrington <jmd>
Group administrator
Sun 30 Nov 2008 04:11:25 AM UTC, comment #3: 

I fixed this in the rewrite-sheet branch.

Leaving this item open until that branch is merged.

John Darrington <jmd>
Group administrator
Mon 27 Oct 2008 04:40:53 PM UTC, comment #2: 


>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.

Ben Pfaff <blp>
Group administrator
Mon 27 Oct 2008 11:34:44 AM UTC, comment #1: 

I'll try to get around to looking at this soon.

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 still however need a way of retrieving a variable by index.  I think this could be done by making the abt work in cooperation with a hash or hmap where the abt node is keyed by index.

Does this sound plausible?

John Darrington <jmd>
Group administrator
Thu 09 Oct 2008 08:30:16 AM UTC, original submission:  

Reported by Janice Adelaide:

I have been trying to insert a new row of variables between two existing rows. Unfortunately, I have been able to insert rows only at the top i.e. when clicking on the "insert variable" button, it always inserts the row of new variables at the top and I am not being able to copy or cut it to another location.

John Darrington <jmd>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-12-15 jmd StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2008-11-30 jmd StatusNone In Progress
    2008-10-27 jmd ReleaseNone Before 0.8.0

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code