-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Generate editor docs on a thread #50864
Conversation
reduz
commented
Jul 25, 2021
•
edited
Loading
edited
- The main generation could not be moved to a thread, unfortunately, as it instantiates classes to get default values, interacts with ProjectSettings, etc.
- Only uncompressing documentation and merging it is threaded.
- Seems to improve editor load times by 0.5 seconds.
Benchmark
I backported this PR to
|
editor/editor_help.h
Outdated
@@ -31,6 +31,8 @@ | |||
#ifndef EDITOR_HELP_H | |||
#define EDITOR_HELP_H | |||
|
|||
#include "core/os/mutex.h" |
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.
I don't see a direct use of Mutex
in the added code.
editor/editor_help.cpp
Outdated
|
||
void EditorHelp::generate_doc() { | ||
doc = memnew(DocTools); | ||
doc->generate(true); //not doable on threads, unfortunately since it instantiates all sorts of classes to get default values. |
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.
doc->generate(true); //not doable on threads, unfortunately since it instantiates all sorts of classes to get default values. | |
doc->generate(true); // Not doable on threads unfortunately, since it instantiates all sorts of classes to get default values. |
Commits should be squashed. |
* The main generation could not be moved to a thread, as it instantiates classes to get default values, interacts with ProjectSettings, etc. * Only uncompressing documentation and merging it is threaded. * Seems to improve editor load times by 0.5 seconds.
bd7ff6c
to
df7636b
Compare
Tested after rebase against the current
|
Thanks! |