Comments (5)
I think most of the performance can be won by the third solution. This is a common solution in most IDEs which also use regex-based syntax highlighting.
Not sure what you mean by the following:
Only highlight viewport, and only when changed
Is it when viewport has changed (e.g. resizing, scrolling) or upon changing the content?
from boop.
Is it when viewport has changed (e.g. resizing, scrolling) or upon changing the content?
Both, though I'd say the first step would be only when changing the content, on a line-per-line basis. Since it's using NSAttributedString in the background, resizing and scrill won't change anything if the whole thing already got rendered.
from boop.
Wouldn’t this mean that pasting large amount of text would be slow if it had to parse all the text to highlight it.
I can see an issue if it only highlights the text that is visible in the viewport. Scrolling and resize would not update the highlighting.
from boop.
Correct, first paste would be a bit slow but I think that's an ok tradeoff for a first improvement. The biggest issue right now is the slowness when typing in a large document
from boop.
Fixed in release 1.3.0
from boop.
Related Issues (20)
- Abandoned? HOT 6
- Feature Request: Suggested actions
- can't select a script HOT 1
- Feature request: Persist boop
- [Feature] Generate current timestamp
- Decouple Scripts from main repo
- JSON to Query String action should URL encode parameters
- Work with Tabs HOT 2
- QR Code
- Feature Request: asn1js support HOT 1
- [Feat] Ability to Change Activation Key HOT 4
- Script to convert yaml to .properties files
- Feature Request: Open Scripts Folder
- Bug Report: unexpected replacement of tabs with spaces
- [FR] Read custom scripts from subdirectories inside the Customer script folder location
- Feature Request: convert clipboard to UUID HOT 3
- RangeError. Internal Error. Icu error in custom script HOT 1
- Can't open *.nim file
- Dead project? HOT 1
- Ascii to Text 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 boop.