mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 00:40:12 +00:00
c921c76dd2
Introduce a static method so we don't need to copy paste code. Note that the static method still largely duplicates what the method .buildIndex() will later do. Both loops iterate the reference groups and the references in each group. The main difference is that the "is empty" check stops extremely early the moment it finds any non-empty group. That's also why I'm convinced it's not worth caching the result. I benchmarked it and it's nanoseconds. But there are more reasons: The non-static .isIndexEmpty() method is currently only used when Citoid is active the same time. Which means the cached result was entirely unused on installations without Citoid. Bug: T356871 Change-Id: Id5c4295086bc977ef52ad141be9962d2eecb1bcc |
||
---|---|---|
.. | ||
ext.cite.referencePreviews | ||
ve-cite | ||
.eslintrc.json |