Coder Social home page Coder Social logo

Comments (15)

PaulBGD avatar PaulBGD commented on August 16, 2024 1

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.

randy3k avatar randy3k commented on August 16, 2024

It is unfortunate something hard to optimize. If you figure out something, please let me know.

from terminus.

brupelo avatar brupelo commented on August 16, 2024

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.

randy3k avatar randy3k commented on August 16, 2024

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.

lapega avatar lapega commented on August 16, 2024

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.

randy3k avatar randy3k commented on August 16, 2024

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.

lapega avatar lapega commented on August 16, 2024

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.

randy3k avatar randy3k commented on August 16, 2024

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.

landoncope avatar landoncope commented on August 16, 2024

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.

randy3k avatar randy3k commented on August 16, 2024

by speeding up, do you mean the rendering time or the delay between typing keys?

from terminus.

landoncope avatar landoncope commented on August 16, 2024

@randy3k: rendering time

from terminus.

landoncope avatar landoncope commented on August 16, 2024

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.

randy3k avatar randy3k commented on August 16, 2024

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.

landoncope avatar landoncope commented on August 16, 2024

@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.

randy3k avatar randy3k commented on August 16, 2024

@lapega

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.