Comments (2)
It should be fairly obvious that the current rendering strategy of mapping a line render function over the visible area does not work for this. Unlike multiline strings, multiline comments are way too common to just ignore them, so a new rendering method is needed.
Folding over the entire file, while staying true to the philosophy of "No caching means no caching bugs", is utterly impractical, since it would slow down rendering larger files to a crawl. And dear Lord, we have enough performance problems already.
So we need some way of caching rendering information, possibly in a symbol table. We can calculate the differences between two buffer states by making use of the fact that changes always occur near the focus, never at the ends. Aligning the buffer lines via prefLen
should yield the point where the two buffers start to match, so only that area would need to be re-parsed every time.
This, in turn, requires a quick way to check large strings for equality, possibly by transparently integrating hashes into Buffer
.
All these are sweeping changes I do not want to implement a mere week from launch, so I'll have to delay this until after release. But sooner or later, this will have to happen, since I'd consider block comments a fairly substantial feature and simply too common and important to ignore.
from wsedit.
Done (1bb07db).
from wsedit.
Related Issues (20)
- Improve help/tutorials section HOT 2
- FYI: No longer garbles Unicode on xterm HOT 6
- Saving a file with jump marks crashes the editor. HOT 1
- Very slow and laggy with large files HOT 7
- Add options to control clipboard backend explicitly. HOT 1
- Hooks (perform custom action on {save,...})
- The binary is compiled as wsed rather than wsedit HOT 3
- Terminal does not define required capability "cup" HOT 4
- Language files in /usr/local/etc/wsedit aren't recognized HOT 3
- Slim down CRASH-DUMPs HOT 1
- Make Ctrl-P respect selection HOT 1
- Custom theme support HOT 1
- Mangled symlinks on save with atomic saves
- Add some way of tracking the relative vertical position in a file HOT 1
- Add search term highlighting HOT 1
- Create a test suite to improve stability HOT 3
- Introduce an additional, pure editor monad to simplify testing. HOT 1
- -d could use some improvements HOT 1
- Introduce jump marks similar to emacs HOT 1
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 wsedit.