Skip to content

Commit

Permalink
Processing: Reuse file dicts loaded to memory
Browse files Browse the repository at this point in the history
This should decrease the I/O load and fix a bug where the
"Files that will be checked" message appears twice when run in
debug mode.

Fixes coala#2544
  • Loading branch information
adtac committed Aug 5, 2016
1 parent ef287a4 commit 45bfec9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coalib/processes/Processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,10 @@ def instantiate_processes(section,
# Note: the complete file dict is given as the file dict to bears and
# the whole project is accessible to every bear. However, local bears are
# run only for the changed files if caching is enabled.
file_dict = get_file_dict(filename_list, log_printer)
complete_file_dict = get_file_dict(complete_filename_list, log_printer)
file_dict = {filename: complete_file_dict[filename]
for filename in filename_list
if filename in complete_file_dict}

manager = multiprocessing.Manager()
global_bear_queue = multiprocessing.Queue()
Expand Down

0 comments on commit 45bfec9

Please sign in to comment.