-
Notifications
You must be signed in to change notification settings - Fork 23
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
Memoize vocabularies #42
Conversation
src/collective/taxonomy/widget.py
Outdated
|
||
def update(self): | ||
"""See z3c.form.interfaces.IWidget.""" | ||
SequenceWidget.update(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't you use super(OrderedSelectWidget, self).update() here? I think widget.HTMLSelectWidget.update is not called right now.
src/collective/taxonomy/widget.py
Outdated
time() // ONE_DAY | ||
) | ||
return key | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add another component to the key (not sure what) so that the cache is invalidated if you change the taxonomy ttw or by import?
Should we try and get this into 1.5? |
I'd love to have it but don't have time at the moment to make this work in a generic way. This is the cache function we use. We invalidate only on changes to keywords.
If someone wants to step in go ahead. |
@petschki – would be nice to get this into 1.5.0 perhaps? I think using the |
I’ll take a look at this tomorrow.
|
@malthe @vincentfretin well ... this does the trick ... can anybody test this with some huge sample vdex file or mail it to me, so I can test it? |
I've tested this with a VDEX file with 3 languages and 1500 items each language ... so far no performance problems to me. I think we are ready to merge and release. |
This has a big performance win for huge vocabularies.