Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Conversation

@forslund
Copy link
Collaborator

@forslund forslund commented Jul 8, 2019

Description

Try to speed up the skills process startup.

  • Run msm update after skills are loaded with a reduced thread count
  • Fetch skill settings in parallel with rest of the skill loading
  • Ensure that skill manifest is always uploaded as early as possible

This depends on a pending change in msm to allow reducing the number of threads used by the msm.apply() method.

I'm also testing how it behaves when loading skills in parallel using a thread pool.

How to test

Assert the skills are loaded and updated as normal, with any luck some of the blocking calls have been removed from the critical path and a speedup can be seen.

Contributor license agreement signed?

CLA [ Yes ]

@forslund forslund added the Status: Work in progress PR being actively worked on, not yet ready for review. label Jul 8, 2019
@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Jul 8, 2019
@forslund forslund changed the title Feature/skills startup speedup Skills process startup speedup Jul 8, 2019
forslund added 4 commits July 9, 2019 16:52
Upgrade msm to 0.7.8

Using the new max_threads parameters to MycroftSkillsManager.apply() the
skill loading is reduced to 2 threads if it's during runtime while a
fast update (20 threads) are used if not all default skills are
installed to speed up getting core into a 100% operational state.
Checks if the skills haven't been updated for more than 2 weeks or if
the last_download is undefined. last_download may be undefined if
the .msm file is missing or if the list of installed requirements is
missing so skill requirements may be missing.

This also makes sure the skills are normally loaded before the an update
attemt is tried.
Skill manifest is now sent on each startup if paired otherwise after successful pairing.
@forslund forslund force-pushed the feature/skills-startup-speedup branch from 3ad30cf to 94ab53f Compare July 9, 2019 14:52
@forslund forslund requested a review from davidwagnerkc July 9, 2019 14:58
@forslund
Copy link
Collaborator Author

forslund commented Jul 9, 2019

Msm has been released with the max_thread support so this can now be tested. Suggestions for other improvements are welcome.

@forslund forslund removed the Status: Work in progress PR being actively worked on, not yet ready for review. label Jul 10, 2019
@forslund forslund merged commit 5555fa3 into MycroftAI:dev Jul 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants