Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse per-service Contexts into a single Context key. #60

Open
danjacques opened this issue Sep 28, 2016 · 0 comments
Open

Collapse per-service Contexts into a single Context key. #60

danjacques opened this issue Sep 28, 2016 · 0 comments

Comments

@danjacques
Copy link
Contributor

luci/gae is a single package that describes all available services, yet each service has its own set of Context keys. This results in several (10+) values being added to Context just for a simple installation of a full luci/gae service set.

One thought is to collapse those into a single struct that is shared between all of the services and gets copied and derived each time a service mutation is applied. This has several benefits:

  • Services don't have to look each other up internally. This happens quite a bit when using info service from datastore, memcache, taskqueue, etc.
  • Context is shallower, meaning that a dump will show one luci/gae entry, making it more useful in general.
  • Overhead of Context lookups is reduced to one lookup per service call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant