Giter Club home page Giter Club logo

Comments (8)

jazzdan avatar jazzdan commented on May 10, 2024 1

Hey @dougsparling this should be fixed as of the most recent release (https://github.com/windmilleng/tilt/releases/tag/v0.4.2), let us know if it isn't.

Thanks for the report!

from tilt.

jazzdan avatar jazzdan commented on May 10, 2024

I think I can reproduce this on macOS as well. CPU usage seems to hover around 35% for tilt up as reported by htop.

from tilt.

jazzdan avatar jazzdan commented on May 10, 2024

I can't repro the doubling under tmux on macOS, however.

from tilt.

dougsparling avatar dougsparling commented on May 10, 2024

Just to be clear, I meant that the tmux process itself also consumes excessive CPU, not that it seems to have any kind of multiplicative effect on the usage of tilt or my terminal.

Here's a snippet from top:

  PID USER  PR  NI    VIRT    RES    SHR S  %CPU  %MEM     
24195 doug  20   0  141.6m  75.6m  25.7m S 133.9   0.2   0:43.16 tlt                                                                                                                                                                                                                                             
 6683 doug  20   0   54.4m  37.1m   2.8m R  73.4   0.1   8:06.21 tmux: server                                                                                                                                                                                                                                    
...
 6068 doug  20   0  792.8m  44.3m  28.3m S  17.6   0.1   6:29.85 gnome-terminal

from tilt.

jazzdan avatar jazzdan commented on May 10, 2024

Aha! That makes sense, thanks for the clarification @dougsparling.

from tilt.

landism avatar landism commented on May 10, 2024

I've added profiling to tilt with #950 and checked it out in pprof:

(pprof) top20 -cum
Showing nodes accounting for 1990ms, 69.82% of 2850ms total
Dropped 46 nodes (cum <= 14.25ms)
Showing top 20 nodes out of 105
      flat  flat%   sum%        cum   cum%
         0     0%     0%     2630ms 92.28%  github.com/windmilleng/tilt/internal/hud.(*Hud).Update
         0     0%     0%     2630ms 92.28%  github.com/windmilleng/tilt/internal/hud.(*Hud).refresh
         0     0%     0%     2630ms 92.28%  github.com/windmilleng/tilt/internal/hud.(*Renderer).Render
         0     0%     0%     2600ms 91.23%  github.com/windmilleng/tilt/internal/cli.(*upCmd).run.func1
         0     0%     0%     2600ms 91.23%  github.com/windmilleng/tilt/internal/hud.(*Hud).Run
         0     0%     0%     2600ms 91.23%  github.com/windmilleng/tilt/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1
         0     0%     0%     2580ms 90.53%  github.com/windmilleng/tilt/internal/hud.(*Hud).Refresh
         0     0%     0%     2540ms 89.12%  github.com/windmilleng/tilt/internal/rty.(*rty).Render
         0     0%     0%     2310ms 81.05%  github.com/windmilleng/tilt/vendor/github.com/gdamore/tcell.(*tScreen).Show
         0     0%     0%     2020ms 70.88%  github.com/windmilleng/tilt/vendor/github.com/gdamore/tcell.(*tScreen).draw
         0     0%     0%     2020ms 70.88%  github.com/windmilleng/tilt/vendor/github.com/gdamore/tcell.(*tScreen).drawCell
         0     0%     0%     2020ms 70.88%  io.WriteString
         0     0%     0%     2010ms 70.53%  internal/poll.(*FD).Write
         0     0%     0%     2010ms 70.53%  os.(*File).Write
         0     0%     0%     2010ms 70.53%  os.(*File).WriteString
         0     0%     0%     2010ms 70.53%  os.(*File).write
    1990ms 69.82% 69.82%     1990ms 69.82%  syscall.Syscall
         0     0% 69.82%     1990ms 69.82%  syscall.Write
         0     0% 69.82%     1990ms 69.82%  syscall.write
         0     0% 69.82%      290ms 10.18%  github.com/windmilleng/tilt/vendor/github.com/gdamore/tcell.(*tScreen).getWinSize

It looks like either we're drawing much too frequently, or drawing is significantly more expensive than one might expect. I'll keep digging.

For posterity: I had trouble reproing this. I was using an 80x25 terminal. Going up to a 300x70 terminal got my tilt CPU usage up to 70%.

from tilt.

landism avatar landism commented on May 10, 2024

#955 made one case a lot better for me.

I'm now running a project with a ~10 minute build, and tilt is now up to 110% CPU.

For 8.5s of CPU time, a profile shows:
4.85s in stringBuilder.Text
1.28s in Tokenizer.Next
.9s in runtime gcDrain
.43 in mallocgc

from tilt.

jazzdan avatar jazzdan commented on May 10, 2024

Oh feel free to reopen then @landism

from tilt.

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.