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

Improve caching of components inside cdist #136

Open
maxbachmann opened this issue Sep 27, 2021 · 0 comments
Open

Improve caching of components inside cdist #136

maxbachmann opened this issue Sep 27, 2021 · 0 comments

Comments

@maxbachmann
Copy link
Member

maxbachmann commented Sep 27, 2021

Currently cdist uses the following architecture:

for row in rows:
    cache = CreateCommonObjects(queries[row])
    for col in cols:
        cache.ratio(choices[col])

This works fine as long as cols is big. However, in a worst case cdist is called with a single choice. In this case creating the cache introduces a lot of overhead. It would make sense to create the cache for the cols in this case:

for col in cols
    cache = CreateCommonObjects(choices[col])
    for row in rows:
        cache.ratio(queries[row])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant