Giter Club home page Giter Club logo

Comments (2)

abo-abo avatar abo-abo commented on August 31, 2024 7

Thank you for sharing your configuration, elisp libraries and over all contribution to emacs.

You're welcome.

I have cloned your emacs configuration and emacs starts under a second. How do you manage to keep the emacs init time very low? I use use-package macro and for me emacs takes few seconds to startup.

A lot of stuff is autoloaded. See hooks.el - it contains 72 add-hook statements. The functions in add-hook are usually defined in their own file, which is related to the corresponding major-mode.
So instead of loading ~72 files and all dependencies that they pull in, I load only 72 add-hook statements that are instant because they don't load any packages.
Then when e.g. python-mode is opened:

  1. It calls python-mode-hook,
  2. which calls ora-python-hook,
  3. which is autoloaded from ora-python.el,
  4. which means that the whole content of ora-python.el is loaded only when the first python-mode file is opened.

See also update-all-autoloads, which generates the loaddefs.el file.

Can you share some pointers or write up a blog post on how you make emacs startup fast?

I thought that I already had written that subject, but I can't find it now. If I don't find it, I'll make a blog post when I have time.

from oremacs.

hhnr avatar hhnr commented on August 31, 2024

That's interesting. I think spacemacs also does something similar? It installs python mode specific packages only when the first python mode file is opened.
I will look into the your configuration. Looking forward to your blog post!

Thanks.

from oremacs.

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.