GNU bug report logs -
#76538
31.0.50; 31.0.50; 31.0.50; feature/igc: using magit-section-cycle-global (S-TAB) and magit-section-toggle (TAB) in some random ways blocks GNU Emacs.
Previous Next
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> FWIW, I have a branch `scratch/markers-as-gap-array` where I replace the
> linked list of markers with an "array with a gap" where markers are
> sorted, so we use a binary search. It might help in your case.
Maybe not on feature/igc (this bug is about igc). It made changes to the
way markers are stored in buffer and your branch might need to be
adapted to work with the branch.
> It was pretty close to be "ready to merge" at some point, except that
> I had trouble convincing myself that it was a clear win: in my tests, it
> made `save-excursion` slower (the current naïve data-structure is ideal
> for most "trivial" uses of `save-excursion`: we create a marker,
> push it onto the head of the list, do a bit of unrelated work in the
> body and then come back and just pop the marker that's still at the head
> of the list) and the cases where it makes the code faster are hard to
> come by, other than artificial micro-benchmarks.
FYI, feature/igc is also using an array for markers. So, your approach
might not be as bad here.
> Indeed those cache-markers are referenced only weakly so they currently
> disappear at every GC. I can't remember if I kept this behavior in my
> branch, but I remember considering some alternative where we keep every
> other weak marker.
It may or may not be the case on feature/igc. I think it remains to be
the case, and, unlike master, GC on feature/igc may happen at arbitrary
time rather than at specific code points. So, it may clear the cache in
the middle of the search (AFAIU).
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
This bug report was last modified 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.