tkf / emacs-ipython-notebook

IPython notebook client in Emacs
tkf.github.com/emacs-ipython-notebook/
GNU General Public License v3.0
548 stars 51 forks source link

EIN causes org-capture to stall #191

Open aijony opened 6 years ago

aijony commented 6 years ago

I was going to write this bug on the Spacemacs page, but realized the ein page would be a more appropriate, since I'm fairly certain this is a problem for other Emacs users.

Description :octocat:

ein causes org-capture to stall up. It honestly isn't that bad. It takes 2-3 seconds on my computer until org-capture is ready. It's just ironic because org-capture is about saving the 2-3 seconds selecting a file. I'm just going to disable ipython-notebook for now.

I don't know why ein is even touching org-capture at all. I think it has something to do with org-store-link.

Observed behaviour: :eyes: :broken_heart: The first time running org-capture will be really slow. However, the subsequent org-captures will be smooth.

Expected behaviour: :heart: :smile: It should happen immediately, and it does without the ipython layer.

System Info :computer:

millejoh commented 6 years ago

Confirmed this is happening on Linux, but I can't seem to reproduce on my Windows setup.

Doing a little bit of profiling (you can confirm: call M-x profile-start then do org capture and follow with M-x profile-report) it looks like most of the time is being spent in require. The delay you are seeing is because Emacs is loading ein which is, to borrow a phrase: "Big. Really big. The biggest!"

It is hard to load just part of ein without loading almost all of ein, unfortunately, but you can at least move the observed delay to your emacs startup. Put in a call to (require 'ein-org) somewhere in your init and you should stop seeing this delay on the first call to org-capture.