Giter Club home page Giter Club logo

Comments (11)

rnkn avatar rnkn commented on May 25, 2024

Try removing window-configuration-change-hook and see if you get better results. post-command-hook is actually not called as much as one might think.

from olivetti.

kqr avatar kqr commented on May 25, 2024

Could you explain your reasoning for thinking that may be the culprit? The slowness was experienced while simply navigating left and right on a single line without triggering scrolling on any sort, so I have a hard time imagining that window-configuration-change-hook would be called. My suspicion of post-command-hook was further strengthened by the problem going away after I removed olivetti-set-environment from post-command-hook.

It might be because I have various other modes enabled, but for me, post-command-hook runs on pretty much every keypress. Among other things:

  1. On arrow key navigation (next-line, previous-line, evil-backward-char, evil-forward-char),
  2. On inserting keypresses in a buffer (outshine-self-insert-command), and
  3. On inserting keypresses in the minibuffer (self-insert-command).

I'll give you that the amount of time I spend actively pressing keys is small in comparison to the time I spend looking at buffers, but using that to say "it's not called as much as one might think" seems like a mischaracterisation. During those short bursts of active typing are precisely the time I need insertion to be responsive!

from olivetti.

rnkn avatar rnkn commented on May 25, 2024

I know it seems counterintuitive; I got into a protracted argument with Eli about this but ended up eating humble pie because window-configuration-change-hook is called way more often than post-command-hook.

from olivetti.

rnkn avatar rnkn commented on May 25, 2024

from olivetti.

rnkn avatar rnkn commented on May 25, 2024

Might be able to get away with only window-size-change-functions, but that has broken compatibility in 27.x. I'm handing olivetti over to GNU ELPA so this should be fixed soon by people who know more about the display code than me.

from olivetti.

kqr avatar kqr commented on May 25, 2024

I have no doubt that exchange happened, but I still don't know what you mean by "way more often".

I tried verifying my experience just now by adding a function to window-configuration-change-hook that incremented a number by one, and another function to post-command-hook that decremented the same variable by one. I then performed the operations I'm talking about (navigating around a buffer, inserting some text) for half a minute, and then when I displayed the value of the counter it was distinctly negative.

I'm not using Spacemacs (I still have nightmares from trying to wrap my head around configuring it!), but I do have evil-mode active.

from olivetti.

kqr avatar kqr commented on May 25, 2024

Posting as a separate comment for emphasis:

I should state more clearly that this is not a general, constant problem, which makes it hard for me to isolate the issue. I'm currently running the default Olivetti hook set-up with no issues at all. This has yet only happened once, after Emacs had been running for quite some time. However, when it happened, it was very clear that the post-command-hook took way too long.

I'll try to remember to fill in more information if/when it happens again.

from olivetti.

rnkn avatar rnkn commented on May 25, 2024

Interesting. I tried a similar incrementing test and window-configuration-change-hook won. But that was maybe Emacs 25, and I suspect that work has been done to call that hook less and window-size-change-functions more.

I've had some feedback from Stefan about how best to get this working nicely so it should be better soon.

from olivetti.

rnkn avatar rnkn commented on May 25, 2024

I've switched back to window-configuration-change-hook and removed post-command-hook. Changes have been pushed to GitHub and GNU ELPA.

from olivetti.

kqr avatar kqr commented on May 25, 2024

I have upgraded to the latest olivetti package now, and I'll try to take note of this happening again. Although due to the nature of the issue, it would take some time. I don't know if you want to close this issue and then I reopen it if it happens again, or however you want to handle it.

Thank you for maintaining such a great mode!

from olivetti.

rnkn avatar rnkn commented on May 25, 2024

Cool, thanks for checking it. I'll close now and if it you see further problems, can you report to [email protected] (which will go to me).

I still need to push some more changes that should speed things up for Emacs 27. (I'm trying to keep support for Emacs 24 onwards.)

from olivetti.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.