Comments (12)
a large org-mode file (276K)
How big is this in lines? several secs after typing one letter?
I am investigating various performance issues atm. There is polymode/polymode#227 which I am working on at the moment but the fix is non-trivial I am afraid. Your issue might be unrelated. I will check.
from poly-org.
5704 lines. yes, each character-insertion keypress has somewhere in the neighborhood of 1-5sec delay. When I'm not actually inserting or deleting characters (i.e. moving point) I don't experience the same lag.
I can't say I've noticed the same problems mentioned in the issue you linked, but I haven't tested it thoroughly.
from poly-org.
Is there anything specific about the document? I am testing with docs containing 10k lines and typing behaves okeish. Can you share or put together a reproducible document?
from poly-org.
sure.
example.zip
from poly-org.
I don't see any latency. Which section in particular?
My bet is that you are loading old polymode somehow. Could you git pull poly-org
and do make start
from within and test on your file from the plain emacs which was open?
from poly-org.
you're right, that works fine. There seems an issue between polymode and another package/setting in my emacs config. When i disable polymode everything works fine, but poly/org on their own also work correctly. I've tried profiling but not seeing anything obvious yet. I'll keep looking; maybe there's a compatibility issue with another package that would actually be useful for someone else with a similar config. My plan was to keep running the profiler, but if you have any other strategies for how you would go about this I'd be happy to hear 'em!
from poly-org.
No good ideas here. Profiler might be useful. In which place does it show the bottle-neck?
A full proof strategy is to bisect your config.
from poly-org.
I've looked a bit and the issue seems to be related to the combination of org-ref and polymode. If I disable either org-ref or polymode, editing speed is fine but using both together creates lag. This issue seems to be the problem on the org-ref side. If I use this suggestion, editing works but then I have to call font-lock-fontify-block manually. This other suggestion helps, but editing is still too slow to be usable.
from poly-org.
I have just pushed a major speed improving change to the core. Chances that it would help with this issue are small, but you could still try it out.
AFAIS the issue is on the org-ref side with the buffer parsing in font-lock. The interaction between org and polymode is most likely due to the fact that jit-lock does interrupt the fontification on user-input but poly-lock does not. I avoided that complication as fontification is lazy anyhow and is done by small chunks (2000 chars). Crazy parsing of the entire buffer during the font-lock is not the right way to go for any mode.
I haven't met other use-cases of very slow font-lock keywords so far. So I really hope this could be made right on the org-ref side.
from poly-org.
@vspinu I've just tested the changes, and I actually do notice a significant difference. Without the org-ref-colorize-links
change suggested by @jkitchin, there is little to no lag now. With his suggestion, there is little to no lag anyway as reported on that issue.
from poly-org.
Thanks for reporting back. The change in the core concerns syntax-propertize which is now 20x faster than before and was most likely triggered by org-ref on the entire buffer before.
Can we close this then?
from poly-org.
Closing, thanks @vspinu!
from poly-org.
Related Issues (20)
- Poly-org sends entire org file to python HOT 4
- C-c C-c in lisp blocks doesn't work as expected HOT 3
- How to set it up for latex fragments in a org file HOT 4
- Defining polymode for ESS[julia]
- wrong language parsing case HOT 2
- How to disable Variable Pitch Mode HOT 10
- Support for lexical binding HOT 6
- Org properties etc not accessible within blocks HOT 2
- Polymode is triggered in #+Latex_Header org document HOT 3
- Preserve left-/right-margin-width
- Preserve line-spacing HOT 2
- asynchronous export: invalid read syntax "#" HOT 1
- unbound variables when invoking poly-org-mode
- poly-org breaks syntax highlighting HOT 3
- Adding LaTeX delimiters \[...\] and \(...\)
- Collapsed source blocks expand when entering an org source code block with poly-org enabled HOT 2
- Disable poly-org-latex-inner-mode HOT 1
- consult-preview with poly-org don't work
- Set 'polymode-eval-region-function' HOT 1
- 'org-element-at-pointβ cannot be used in non-Org buffer HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poly-org.