Comments (16)
It is normal for big files. I haven´t implemented caching as yet. So, every
time you insert a character chunk detection is triggered.
How big is your file/chunk?
On 10 August 2013 07:06, Muchenxuan Tong [email protected] wrote:
The mode is great! But it became very slow when typing (not when I move
the cursor around).Is it normal?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.
from polymode.
The file is actually quite small, and it's way too slow.
I found turning off font-lock-mode
will make it normal.
from polymode.
It is a bug then. can you please attach your file?
On 10 August 2013 09:21, Muchenxuan Tong [email protected] wrote:
The file is actually quite small, and it's way too slow.
I found turning off font-lock-mode will make it normal.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-22435524
.
from polymode.
I don't think it's related to content of file.
In an Rmd file I can type
# dfdf dfdfdf _
It's fine till now. Then when a new line starts it becomes very slow.:
# dfdf dfdfdf
dfxx _
I guess it has something todo with font-lock.
from polymode.
I have started developing polymode again by adding new markdown+brew+R RAPPORT mode (see #11). The speed problem turned to be the markdown handling of links fontification
I have informed the maintainer and, for the time being, I am removing markdown fontification hooks from polymode.
Could you please check that the speed issues have been resolved. Thanks.
from polymode.
Thanks for the work. However, for me it's still slow.
I've checked window-configuration-change-hook
and after-change-functions
in the buffer:
window-configuration-change-hook is a variable defined in `C source code'.
Its value is (linum-update-current t)
after-change-functions is a variable defined in `C source code'.
Its value is (jit-lock-after-change t)
from polymode.
There are no optimisation and no caching of any kind so far. That will come latter.
Is this a very old computer? I am on a 8 years old laptop and everything is very fast.
Could you please open subset.Rmd in tests directory, got into first paragraph and do M-x (benchmark-run 1000 (pm/get-innermost-span))
. Same for the first code chunk {r test1}
.
For me the first one is 0.44 seconds and the second is 0.25. So even without optimisation everything is infinitely fast.
from polymode.
I use a late-2011 MacBook Pro and shouldn't be that slow.
the result I got from running the benchmark
(0.252103 1 0.09603299999999848)
It's fast when browsing the file, but still slow when typing.
from polymode.
Probably some weird interaction with some other mode. What else do you
have in post-command-hook?
I have (polymode-select-buffer t) in my local hook and the following in
global:
global-font-lock-mode-check-buffers
global-subword-mode-check-buffers
global-auto-complete-mode-check-buffers
smartparens-global-mode-check-buffers
sp--post-command-hook-handler
Just to make sure that it is polymode to blame. If you do
M-: (remove-hook 'post-command-hook 'polymode-select-buffer t)
do you observe any speed up while typing?
from polymode.
I tried to remove everything in post-command-hook
and it's still slow.
Yet setting pm--dbg-fontlock
to nil
save my life, becoming insanely fast.
from polymode.
Ok. I've figured out. It has something todo with linum-mode
. It's slow when global-linum-mode
is enabled.
from polymode.
Thanks for figuring it out. I can reproduce. The difference is indeed
noticeable.
Linum is very heavy as it puts overlays on every line. Poly-mode
transfers overlays between indirect buffers. Will have to figure out a
workaround.
from polymode.
I also have this problem with linum-mode
but in my case nothing ever appears until you move the cursor. Is there a line I can put in my .emacs to prevent global-linum-mode
when I open a file in polymode e.g. .Rmd
?
from polymode.
I plan to revisit polymode in the near features and to investigate this
issue more closely.
Each polymode has a hook. In this case poly-markdown+r-mode-hook. You
can use it to deactivate linum-mode.
Nick Pullen on Fri, 28 Feb 2014 04:56:50 -0800 wrote:
I also have this problem with linum-mode but in my case nothing ever appears
until you move the cursor. Is there a line I can put in my .emacs to prevent
global-linum-mode when I open a file in polymode e.g. .Rmd?—
Reply to this email directly or view it on GitHub.
from polymode.
Thankyou for this thread! I had just about given up trying to use polymode because I couldn't figure this issue out. Might be useful to add a note about global-linum-mode
to the warnings section of the readme.
Thanks for the great work
from polymode.
This one seem to have been finally fixed.
from polymode.
Related Issues (20)
- can't find polymode via package-install? HOT 1
- electric-indent-mode
- How to run a function is indirect buffers with the same major mode only?
- Typescript-xml polymode
- Setting mode file local variable to polymode applies itself recursively infinitely until cancelled
- Background Adjustment when Background Unspecified
- polymode creates additional [web] buffer
- Interaction with nix-mode: font-lock broken HOT 4
- Chunks not following automatic Emacs switch to light/dark theme HOT 5
- Polymode, Poly-COMEEGA and COMEEGA (Collaborative Org Mode Enhanced Emacs Generalized Authorship)
- inner mode indentation not works on the first line after head mark
- org-mode links become invisible HOT 3
- Polymode does not work in org-edit-special
- eglot sees the whole outer buffer content HOT 3
- hs-hide-all gives unbalanced parentheses error when it shouldn't in some Rnw buffers
- Inconsistent font size in heads
- Beginning of the Polymode buffer is ignored by flymake HOT 1
- quoted backslash in polymode chunks breaks font-locking
- how to activate AucTeX in poly-R for Rnw files
- Extra buffers popping up all over the place when switch-to-buffer-obey-display-actions is non-nil
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 polymode.