mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 15:11:02 +00:00
Speed up startup time
Currently the thing most slowing down startup is calling docker-compose config --hash="*" Even calling docker-compose config --services, which only returns service names, takes about half a second. So that's the main bottleneck. We could try and directly obtain the service names, but we'd then need to have our own algorithm for composing all the docker-compose files being used, and that gives us more stuff to maintain
This commit is contained in:
parent
5d55939719
commit
6cc6f61ad1
2 changed files with 2 additions and 4 deletions
|
|
@ -57,7 +57,7 @@ func (gui *Gui) handleServiceSelect(g *gocui.Gui, v *gocui.View) error {
|
|||
|
||||
service, err := gui.getSelectedService()
|
||||
if err != nil {
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
key := service.ID + "-" + gui.getServiceContexts()[gui.State.Panels.Services.ContextIndex]
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ import (
|
|||
var cyclableViews = []string{"status", "services", "containers", "images"}
|
||||
|
||||
func (gui *Gui) refreshSidePanels(g *gocui.Gui) error {
|
||||
if err := gui.refreshContainersAndServices(); err != nil {
|
||||
return err
|
||||
}
|
||||
// not refreshing containers and services here given that we do it every few milliseconds anyway
|
||||
if err := gui.refreshImages(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue