Comments (8)
Got it! I opened a relatively small file (14.5+k lines), and didn't noticed any hang, but it indeed consumed 100-110% of CPU for a brief moment. Taking a spindump, the responsible was AttributedString + JSCore, which are used by Highlightr. A better approach would be to use something more native to handle syntax highlighting altogether, and perhaps only try to stylise what is on the viewport (and what is about to become visible), together with Tree Sitter (leveraging viktorstrate/swift-tree-sitter, for instance) or any other engine. I have a small background on that, so lmk in case you folks need help. π»
Regarding the tabs, I'll take a look! Thank you for reporting!
from codeedit.
Hi there @nanashili! I'd like to take a swirl on this one!
Would you be so kind as to explain what comprises a large file? Would it be large as in the quantity of columns, lines, or just overall size? How can I attempt to reproduce this issue?
Thanks!
from codeedit.
Hi there @nanashili! I'd like to take a swirl on this one!
Would you be so kind as to explain what comprises a large file? Would it be large as in the quantity of columns, lines, or just overall size? How can I attempt to reproduce this issue?Thanks!
Hi @heyvito, i think it might be the amount of lines as the issue that caused that was a very small file but had a lot of lines.
Steps to reproduce would to just be open a file with that spands a few hundered lines and see if the issue occurs.
from codeedit.
@heyvito looks like that issue has been fixed.... But I did find another threading issue you might want to attempt
When trying to close multiple tabs fast the editor breaks due it not being able to remove the tabs fast enough.
You can reproduce this by opening multiple tabs and closing them fast.
from codeedit.
Got it! I opened a relatively small file (14.5+k lines), and didn't noticed any hang, but it indeed consumed 100-110% of CPU for a brief moment. Taking a spindump, the responsible was AttributedString + JSCore, which are used by Highlightr. A better approach would be to use something more native to handle syntax highlighting altogether, and perhaps only try to stylise what is on the viewport (and what is about to become visible), together with Tree Sitter (leveraging viktorstrate/swift-tree-sitter, for instance) or any other engine. I have a small background on that, so lmk in case you folks need help. π»
Regarding the tabs, I'll take a look! Thank you for reporting!
β₯οΈ
@MarcoCarnevali @pkasila might want to looks at this.
from codeedit.
I believe that Highlightr is causing a lot of issues right now like freezing while loading large file, lagging while scrolling, color-flashing while inputing, etc. And I agree that a real native editor should not come up with a solution involving JSCore. If you would like to rebuild current syntax highlighting feature by using a native engine, or (probably) build one from ground-up, I would like to join and help.
from codeedit.
This is the CPU usage while opening a file that has 30k lines. It freezes for around 2 seconds (totally frozen) and then has some scroll-lags in the next ten seconds. After that, it runs smooth, but it is not an acceptable experience while opening the file. (Device is running on Apple M1 Pro with 16GB memory)
from codeedit.
@heyvito @lilingxi01 Thanks for your input! We know that Highlightr is not very efficient and we are evaluating other options. I'm not quite sure what the current state is but I think we will be going the Tree Sitter route. Please get in contact with @MarcoCarnevali and @pkasila on that matter. We appreciate your help and are looking forward to what you come up with.
Also have a look at issue #36
from codeedit.
Related Issues (20)
- π Page up and page down keys don't do anything
- β¨ β§βT keyboard shortcut to bring back closed editor tabs
- β¨ β+Tab and ^β§+Tab keyboard shortcuts to cycle between window tabs HOT 2
- β¨ β§β[ and β§β] keyboard shortcuts to cycle between editor tabs in the active editor HOT 2
- π Tooltips on buttons are not working
- β¨ Add translation to the IDE settings HOT 1
- β¨Dependency Injection System
- β¨ FileService implementation
- β¨ GitService implementation
- β¨ LogService and logging implementation
- β¨ NotificationService implementation
- β¨ Add background images
- π Tooltips not working in navigator area, inspector area, or utility area
- β¨ Push new branches to remote
- π§Ή Improvements to SwiftLint HOT 2
- β¨ Migrate to String Catalogs HOT 2
- π Non Line breaking not working
- β¨ Show modified files by folder view
- β¨ Show commit co-authors
- π Menu Bar Items Not Updating HOT 3
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 codeedit.