Comments (6)
Thanks for the report.
Is there any chance you could provide a copy of the file in question (or a similar one that also takes a long time to load)? I don't have any Python files of that size, so it's difficult to analyze the performance of the folding algorithm on that scale.
It may be that the algorithm I'm using simply doesn't perform well past a certain buffer size. If that's the case, there may not be much that can be done about it without rethinking the entire approach. That said, if you can provide an example, I can at least take a look and see if there's any low-hanging fruit to be picked performance-wise.
from simpylfold.
After giving it a little more thought, there is one fairly obvious optimization I can try, that of memoizing the results of recursive calls to the s:NumContainingDefs
function. I suspect that that could improve performance substantially on large buffers.
When I get a chance, I'll put together a patch. And again, if you can supply an example file, that would be quite helpful.
from simpylfold.
I sent a file to your email address.
from simpylfold.
I just pushed an optimization that improves performance when loading your example file by about 3-4 times on my machine. It's not instantaneous, but it's far more tolerable than it was. Let me know how it works for you.
from simpylfold.
Thanks. Will check it out.
from simpylfold.
Its bearable. Thanks for the patch.
from simpylfold.
Related Issues (20)
- Not clear how to use this plugin HOT 2
- Folds are invalid after running formatter with ale HOT 3
- Releases Support HOT 1
- More configuration HOT 2
- SimpylFold with large modules makes basic operations slow HOT 3
- Auto close fold include current line after delete line HOT 5
- Comment BLOCKS (in file licenses)
- Plugin ceases to work if a module is named after its parent directory HOT 1
- docstring folding not working with empty line HOT 2
- Support folding long block of code by indentation? HOT 4
- Plugin is not working on Ubuntu Vi IMproved 8.0 HOT 3
- Folds only exist after using zx (E490: No fold found) when using "telescope" fzf plugin HOT 6
- Support for other languages? HOT 1
- is it possible to have only 1 line separating folds ? HOT 2
- the function/class names should have an higher contrast than the lines numbers HOT 3
- Possibility of defining custom folds? HOT 1
- Repository not found HOT 1
- Folding Code in Child Classes HOT 2
- SimpylFold won't indent top level functions HOT 4
- Can't turn off docstring folding HOT 5
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 simpylfold.