pspp-dev
[Top][All Lists]
Advanced

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

Re: [patch #6071] Resing/Deleting/Inserting variables in GUI


From: Ben Pfaff
Subject: Re: [patch #6071] Resing/Deleting/Inserting variables in GUI
Date: Tue, 10 Jul 2007 19:24:24 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (gnu/linux)

John Darrington <address@hidden> writes:

> On Tue, Jul 10, 2007 at 07:03:36AM -0700, Ben Pfaff wrote:
>                            Second, in the datasheet
>      case we do want deletions and resizings, etc., to have an
>      immediate effect on each case_index, but not in many other
>      cases.  For example if I read a system file dictionary with
>      sfm_open_reader, and delete some variables from that dictionary,
>      I don't want the dictionary's case_indexes to be adjusted because
>      the cases coming from the system file would then have their
>      variables in positions that I don't expect them to be in.
>
> I see.  So unless we're going to somehow make the dictionary aware of
> the capabilities of the data source with which it's associated (which
> sounds like a nightmare to me) then we have to compromise.  However,
> there may other advantages to keeping the case indices monotonic with
> respect to the dict indices, and accepting the O(n) overhead of
> dict_compact_values (or dict_pad_values) with every
> insertion/deletion.

I think that's the right tradeoff.  dict_compact_values is sort
of expensive, but it only occurs very infrequently (when the user
changes a variable's width or adds or deletes a variable or moves
one around) and I really can't imagine it being a bottleneck.
-- 
"The sound of peacocks being shredded can't possibly be
 any worse than the sound of peacocks not being shredded."
Tanuki the Raccoon-dog in the Monastery




reply via email to

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