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:
Jesse Duffield 2019-06-09 10:59:35 +10:00
parent 5d55939719
commit 6cc6f61ad1
2 changed files with 2 additions and 4 deletions

View file

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

View file

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