diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-14 15:54:04 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-15 13:05:01 +0300 |
commit | 3025b711419fd1813baea5e2a2925c6ccf8d455a (patch) | |
tree | e915fa74473477b5942e8a48b1fac274b00b2a9f /.gitlab-ci.yml | |
parent | b5f8161daeefeaa66e810e9dddec43959333d8a7 (diff) |
Improve ProjectTeam#max_member_access performance
By comparing objects in Ruby we can greatly improve the performance of
this method. In the worst case (should no data be eager loaded) this
will run the same amount of queries as before, in the best case (when
data _is_ eager loadeD) it requires no queries at all.
The added benchmark used to produce around 273 iterations per second.
With this commit this has been increased to almost 40 000 iterations per
second: a speedup of roughly 145 times.
Combined with eager loading Note associations this results in about 30
queries less when viewing a single issue, this in turn cuts down the
loading time by 30-40%.
Diffstat (limited to '.gitlab-ci.yml')
0 files changed, 0 insertions, 0 deletions