From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 36341@debbugs.gnu.org, Deus Max <deusmax@gmx.com>
Subject: bug#36341: 27.0.50; Reading from the Gnus dribble file leaves data inconsistent
Date: Mon, 08 Jul 2019 10:29:17 -0700 [thread overview]
Message-ID: <878st8zb82.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m3ef30ts23.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 08 Jul 2019 18:22:12 +0200")
On 07/08/19 18:22 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I think `gnus-group-set-info' is the only place that happens, so it
>> isn't too terrible to just explicitly set both hashtable and alist in
>> that function. I've attached the commit that does that.
>
> Sounds good -- please apply.
Cool, will do.
>> My plan for avoiding this class of errors in the future is to change the
>> representation of Gnus groups from lists to EIEIO objects. Then
>> `gnus-newsrc-alist' would merely be a disk serialization format, and the
>> hashtable would be the source of authority. That would also make the
>> "dummy.group" unnecessary. But let's see if I get there, and if the
>> changes are accepted...
>
> The whole point of that awkward structure is to allow
> inserting/removing/updating groups from the list-of-subscribed-groups as
> an O(1) operation. Updating is still fine as O(1) with just a hash
> table, but without the point-at-the-previous-element list, you can't
> remove the elements, or add new elements before the group, as an O(1)
> thing.
Okay, I get that. But I wonder how important it is that add/delete
operations be so efficient? Does subscription/unsubscription happen so
often that it needs to be fast? As for sorting, in current master code
sort-order is kept in `gnus-group-list' (when topic mode is off) and
`gnus-topic-alist' (when it's on), so we're already sorting using plain
lists of strings.
In fact, right at the moment, there's already no need for the ordering
in `gnus-newsrc-alist'. All of the "(while (setq info (pop newsrc))"
loops could be replaced right now with "(dolist (g gnus-group-list)
(setq group (gnus-get-info g))"
Eric
next prev parent reply other threads:[~2019-07-08 17:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-23 14:30 bug#36341: 27.0.50; Reading from the Gnus dribble file leaves data inconsistent Lars Ingebrigtsen
2019-06-23 15:34 ` Eric Abrahamsen
2019-06-23 15:41 ` Lars Ingebrigtsen
2019-06-23 16:35 ` Eric Abrahamsen
2019-06-23 18:25 ` Deus Max
2019-06-23 18:38 ` Eric Abrahamsen
2019-06-23 18:40 ` Lars Ingebrigtsen
2019-06-28 22:30 ` Eric Abrahamsen
2019-06-29 10:22 ` Lars Ingebrigtsen
2019-07-03 19:46 ` Eric Abrahamsen
2019-07-04 13:43 ` Lars Ingebrigtsen
2019-07-05 19:24 ` Eric Abrahamsen
2019-07-06 12:06 ` Lars Ingebrigtsen
2019-07-07 23:56 ` Eric Abrahamsen
2019-07-08 16:22 ` Lars Ingebrigtsen
2019-07-08 17:29 ` Eric Abrahamsen [this message]
2019-07-08 17:37 ` Lars Ingebrigtsen
2019-07-09 4:53 ` Eric Abrahamsen
2019-07-09 17:50 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878st8zb82.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=36341@debbugs.gnu.org \
--cc=deusmax@gmx.com \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).