GithubHelp home page GithubHelp logo

'--dump-file' support? about chemacs HOT 4 CLOSED

plexus avatar plexus commented on September 28, 2024
'--dump-file' support?

from chemacs.

Comments (4)

plexus avatar plexus commented on September 28, 2024

Hi Markus,

I'm not familiar with dump-files. Can you explain briefly what this would mean exactly?

from chemacs.

makkus avatar makkus commented on September 28, 2024

Hi,

sorry, yes, should have given some context...

So, Emacs has this feature called 'portable dumper' which lets you dump the (memory) state of an Emacs instance (with all loaded elisp files, packages etc) into a file. If you then start Emacs with the '--dump-file [path_to_dump_file]' option, startup is much faster, since no loading of packages/elisp files has to be done anymore (at least for the packages that were loaded when the whole thing was dumped). You can reduce startup from several seconds to sub-one-second times in some instances. Also, for example the first time opening an org mode file would be much quicker, since the whole of org-mode would also already be loaded into memory.

Now, this only works on the same machine (you can't use dump files on other machines than the one used to create them), or different versions of Emacs. It also mostly only works for the same Emacs configuration used when dumping (this is why I think it'd be a good fit for chemacs, since it already makes it easy to manage those configurations).

The dumping only has to be done once. Well, until there is a configuration or other relevant change. Spacemacs for example has an option to automatically build such a dump file whenever necessary, more or less automatically.
After dumping, you get the speedup with every Emacs invocation, so, for example, in a lot of cases emacsclient is not necessary anymore, since the 'normal' startup is already fast enough. I have a few other use-cases in mind, but I'd need a way to manage different Emacs configs alongside their respective dump files.

Long story short: what I would find useful is an option in a chemacs profile, to specify a path to a dump file along the other options (env, etc...). So, if such a path existed, Chemacs would then start emacs with the '--dump-file' option, pointing to the dump file in question. Does that make sense?

I could implement this myself and send a pull request, but would be keen to know whether you see any blockers/reasons this would not work with Chemacs?

from chemacs.

plexus avatar plexus commented on September 28, 2024

That all sounds reasonable, but I'm not sure we can do that in chemacs. Chemacs is just a .emacs/init.el type script. By the time it kicks in emacs has already loaded...

from chemacs.

makkus avatar makkus commented on September 28, 2024

Ah, ok. Makes sense. In that case I'll probably write a shell-wrapper around chemacs. Thanks!

from chemacs.

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.