-
Notifications
You must be signed in to change notification settings - Fork 383
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
Parse file speed up #4000
Parse file speed up #4000
Conversation
0901a1e
to
75a1cdc
Compare
@@ -392,7 +392,22 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: | |||
|
|||
for dir_path, file_paths in report_file.analyzer_result_files(args.input): | |||
metadata = get_metadata(dir_path) | |||
for file_path in file_paths: | |||
|
|||
specified_file_paths = None |
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'm not sure if this variable is needed. file_paths
could be assigned the new list if any.
] if 'tools' in metadata \ | ||
and len(metadata['tools']) > 0 \ | ||
and 'result_source_files' in metadata['tools'][0] \ | ||
else None |
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.
If this result_source_files
section is missing from metadata.json
then we could fall back to the slow version by using file_paths
again instead of giving no result due to this None
value.
75a1cdc
to
2c2c4a2
Compare
2c2c4a2
to
a7879c2
Compare
The feature can be useful to speed up the parse process when you want to parse one or more specified files. The VSCode Plugin also runs the 'parse --file' command, so the correction can solve the slow file verification problem. It uses metadata.json for plist mapping if the result_source_files section is not empty and contains the pairing of source files and plist files. Before the new feature, the process read all existing plist files to find the specified source file's reports.
The feature can be useful to speed up the parse process when you want to parse one or more specified files. The VSCode Plugin also runs the 'parse --file' command, so the correction can solve the slow file verification problem. It uses metadata.json for plist mapping if the result_source_files section is not empty and contains the pairing of source files and plist files. Before the new feature, the process read all existing plist files to find the specified source file's reports.