Comments (15)
I don't know if it's because of Windows, but rendering is very slow. Switched to just using an external terminal now.
from terminus.
It is unfortunate something hard to optimize. If you figure out something, please let me know.
from terminus.
Sure thing, I'll need to get familiar first with terminus as a user (only 20 minutes of usage so far ;)) and then I'll start getting familiar as a dev so eventually I'll be able to give it a proper shot to this one, so please keep it open in the meantime.
Actually, I've also got a similar problem with some code of mine that start threads to spawn processes and then write to views, the difference between process execution & rendering is also quite big. In my case I think the bottleneck is the number of calls I do to self.view.run_command('append', { 'characters': characters, 'force': True, 'scroll_to_end': True})
is very big while reading from the process so one thing I've thought in my case was minimizing as hard as possible the number of those calls.
Haven't looked yet to terminus code so not sure which method uses to render process stdout/stderr (ie: I'll need to profile it to find the hotspots).
from terminus.
It seems that the bottleneck is the reader of the process tty.
we might how to run the command self.view.window()
and view_is_attached
less often as they can be slow.
from terminus.
In Ubuntu 18.04 there's a little delay when pressing keys. The usage feels very slow compared to gnome terminal or tilix.
Anyway, great plugin!
from terminus.
I measured the delay of typing a key and it is about 0.03-0.04s on my computer, which is barely noticeable. Did you installed a package which may be possible conflicting with Terminus?
from terminus.
I have a lot of packages installed, maybe we can cross data with @brupelo
- ColorPicker
- Emmet Css Snippets
- HTML
- jsonschema
- PHP
- PHP_CodeSniffer
- php-completions
- php-grammar
- php-snippets
- ptyprocess
- pyte
- python-jinja2
- PyV8
- Rails
- SublimeCodeIntel
- Terminus
- wcwidth
- zzz A File Icon zzz
from terminus.
what you are experiencing is different from @brupelo . OP's issue is about rendering of huge output, not about delay in typing a key (though they could be related). It is known that Terminus doesnโt render huge output well.
from terminus.
I've found that commenting out the self.view.window()
line in terminal.py (line 100) speeds things up significantly, though the window is less responsive during the outputting.
from terminus.
by speeding up, do you mean the rendering time or the delay between typing keys?
from terminus.
@randy3k: rendering time
from terminus.
I fiddled with it for a while to come up with a fast solution that was also responsive (during massive output), but I didn't come up with anything. Now that I think about it more, something simple like only allowing that self.view.window()
line to be called every 100ms, but allowing the rest of the loop to run at speed, would probably do the trick.
from terminus.
I have just pushed a commit 158934b which makes rendering more responsive (unfortunately slower). It also removes the use of the dirty code self.view.window()
which may allow us to further optimize the speed.
With that said, being responsive is actually more important here: a user can still interrupt the process with ctrl+c
although the rendering is slow.
from terminus.
@randy3k - I'm using your new code, and it now feels fast enough to me (compared to the original code) with massive output, and responsive as well. I'm running on MacOS.
from terminus.
Just a heads up. I forgot to ask you whether you turned on the debug mode. Obviously, with the debug mode one, the rendering would become much slower.
from terminus.
Related Issues (20)
- Powershell doesn't work properly with ctrl+c
- Contributing HOT 1
- [Fixed] activate a conda environment before calling Python
- Terminus Build System not working for Python since Python v3.11
- autocomplete suggestion
- ANSI escaping not properly for git bash HOT 1
- auto_close does not close based on process return value
- ST 4170 breaks Terminus HOT 4
- Unique .sublime-syntax for terminal views HOT 6
- auto hide terminal if build output is empty HOT 1
- Bright code without color specified results in no bright text
- Terminus flashes when typing when using any monokai pro theme
- Terminus doesn't work at all, outputs "C:\Python312\ -u" at the beginning of an error HOT 1
- Is it possible that when changing projects the path in the terminus panel changes?
- [Feature request] Customize working dir in project settings.
- Terminus not recognized by LSP HOT 1
- Add ctrl+s (Save) to support list of `preserve_keys`
- oh-my-posh colors issue
- Terminus stopped working HOT 2
- Thank you for this package
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 terminus.