Docs: improve online manual lookup time time #104581

Closed
Erik Abrahamsson wants to merge 3 commits from erik85/blender:online-help-improve-time into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

3 Commits

Author SHA1 Message Date
Erik Abrahamsson fb2e6d48e7 Update regex string and None check logic 2023-02-13 10:51:16 +01:00
Erik Abrahamsson 55e66a13b1 Use regex to match fnmatch "special characters"
The previous commit only searched for '*'.
Now checks for all the special matching characters of fnmatch.
2023-02-13 10:51:16 +01:00
Erik Abrahamsson 49163e0540 Online help: Improve docs search time
Matching the rna id's to the search pattern is slow because
of the function `fnmatchcase`. This patch first checks if the pattern
without the last character contains an asterisk, and if not it uses
`startswith` instead of `fnmatchcase`.
The improvement in search time is from around 400ms average before
which is quite noticable, to 1ms average after.
2023-02-13 10:51:15 +01:00