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

Optimize kv binding2 #2533

Merged
merged 35 commits into from
Sep 28, 2014
Merged

Optimize kv binding2 #2533

merged 35 commits into from
Sep 28, 2014

Conversation

matham
Copy link
Member

@matham matham commented Sep 28, 2014

This is a rebase of #2368.

In the last commit, I replaced the binding methods to use a optimized linked list for storing the callbacks instead of the list. The reason is that, although binding and creation of complex widgets seemed faster with this branch, in the kivy.tools.benchmark, my branch was worse than master. After tinkering, the reason is that my branch add a slight cost for storing the largs. The cost of storing the largs < cost of partial, so for complex widgets that made use a lot of partial in lang.py my branch was fatser. But for simpler widgets, the added small cost of saving the largs dominated, hence the benchmark.

benchmark results:

https://gist.github.com/matham/f0becba89f249bc1455b shows the kivy.tools.benchmark.outcome as measured on my system.

The timeit benchmarks from the original pr is still pretty much the same. here's the retested values:

binding properties - __master__: 0.256174957224, pr: 0.111772918976
binding event - master: 0.01135848443, pr: 0.0102056007532
unbinding properties - master: 0.152547753701, pr: 0.012733191232
dispatching `boo0_in` - master: 0.0151368482948, pr: 0.0148598497711

…e the _bind_with_args to fast_bind. Add docs.
@matham matham mentioned this pull request Sep 28, 2014
@tito
Copy link
Member

tito commented Sep 28, 2014

EXCELLENT!

@tito
Copy link
Member

tito commented Sep 28, 2014

Did you fixed the issue that @tshirtman got on the old branch? #2368 (comment)

@tshirtman
Copy link
Member

i think d6a4367 fixes it.

and yeah 👍 on the awesome work :)

tito added a commit that referenced this pull request Sep 28, 2014
@tito tito merged commit 4400586 into kivy:master Sep 28, 2014
@matham matham deleted the lang-optim2 branch September 28, 2014 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants