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

Add memoization for sp--strict-regexp-quote #605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaronjensen
Copy link
Contributor

Fixes #603

To be honest, this didn't seem to make much difference. I couldn't reproduce sp--strict-regexp-quote taking up a large number of samples while profiling and adding the memoization in didn't seem to help. Furthermore, the timers created by the memoize package seem to dominate the profiler without actually seeming to impact typing latency (which makes sense, I guess). If I disabled the timers by setting (setq memoize-default-timeout nil) they didn't appear in the profile, but since that's a global setting I don't think it makes sense for us to set. It doesn't seem like there's a way with this package to say you don't a timeout for a specific function because of the (or timeout memoize-default-timeout).

Long story short, it'd be great if someone else could measure with typometer the difference between memoizing and not. It seemed to not matter too much on my machine.

Lastly, if we were going to memoize, I don't think this is the package for it because we probably don't actually want a timeout for this specific function. Adding so many additional timers probably doesn't help anything.

@Fuco1
Copy link
Owner

Fuco1 commented May 23, 2016

Hm, so if the effect is minimal, I will postpone merging this just yet. No need to bring in an extra complexity if it is for nothing. Thanks for testing it though, I'll leave this open in case we decide to go through with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

Memoize sp--strict-regexp-quote
2 participants