weldr: Preload metadata at startup
For each of the supported distros start a goroutine to depsolve 'filesystem' which will preload the metadata making subsequent responses faster. This is safe to do without limits because we only supposed a limited number of distros, and without additional locking because this is the the same as hitting the API with multiple depsolve requests at the same time.
This commit is contained in:
parent
c864343770
commit
c32f94d6f2
2 changed files with 29 additions and 0 deletions
|
|
@ -123,6 +123,8 @@ func (c *Composer) InitWeldr(repoPaths []string, weldrListener net.Listener,
|
|||
}
|
||||
c.weldrListener = weldrListener
|
||||
|
||||
// Preload the Metadata for all the supported distros
|
||||
c.weldr.PreloadMetadata()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue