Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce (over)use of markers (#1751) #1760

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Conversation

mattiase
Copy link
Contributor

The parser used by the font-lock code created a massive amount of
markers; try to reduce it as far as possible since they make some
operations expensive as long as they are in the buffer. Even orphaned
markers stay until next GC.

Read match data as integers instead of markers, and don't create new
markers when setting the match data. This should work just fine as
long as the buffer isn't changed during the match data lifetime, which
appears reasonable.

The parser used by the font-lock code created a massive amount of
markers; try to reduce it as far as possible since they make some
operations expensive as long as they are in the buffer. Even orphaned
markers stay until next GC.

Read match data as integers instead of markers, and don't create new
markers when setting the match data. This should work just fine as
long as the buffer isn't changed during the match data lifetime, which
appears reasonable.
sergv added a commit to sergv/dotemacs that referenced this pull request Jan 21, 2023
This is a port of haskell/haskell-mode#1760
pull request.

Original commit message:

The parser used by the font-lock code created a massive amount of
markers; try to reduce it as far as possible since they make some
operations expensive as long as they are in the buffer. Even orphaned
markers stay until next GC.

Read match data as integers instead of markers, and don't create new
markers when setting the match data. This should work just fine as
long as the buffer isn't changed during the match data lifetime, which
appears reasonable.
sergv added a commit to sergv/dotemacs that referenced this pull request Feb 20, 2023
This is a port of haskell/haskell-mode#1760
pull request.

Original commit message:

The parser used by the font-lock code created a massive amount of
markers; try to reduce it as far as possible since they make some
operations expensive as long as they are in the buffer. Even orphaned
markers stay until next GC.

Read match data as integers instead of markers, and don't create new
markers when setting the match data. This should work just fine as
long as the buffer isn't changed during the match data lifetime, which
appears reasonable.
@purcell
Copy link
Member

purcell commented Mar 3, 2023

Makes sense to me so will merge. I'm taking a short time to catch up on some PRs like this which have been languishing, thanks for your patience.

@purcell purcell merged commit 810b08e into haskell:master Mar 3, 2023
@mattiase mattiase deleted the cull-markers branch March 3, 2023 17:43
@mattiase
Copy link
Contributor Author

mattiase commented Mar 3, 2023

You are very diligent indeed, thank you!

sergv added a commit to sergv/dotemacs that referenced this pull request Oct 24, 2023
This is a port of haskell/haskell-mode#1760
pull request.

Original commit message:

The parser used by the font-lock code created a massive amount of
markers; try to reduce it as far as possible since they make some
operations expensive as long as they are in the buffer. Even orphaned
markers stay until next GC.

Read match data as integers instead of markers, and don't create new
markers when setting the match data. This should work just fine as
long as the buffer isn't changed during the match data lifetime, which
appears reasonable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants