Support #1570
Reduce the time taken by get_candidates_for_variant function after modifications for matching a hyphenated word with a header without hyphen
Start date:
08/30/2021
Due date:
% Done:
100%
Estimated time:
Description
For the Library Reference book, it is observed that after making the above changes of Issue #1544, the time taken by the get_candidates_for_variant has increased significantly. We need to make sure that the overall increase in time is not so significant.
For this, you would have to, first of all, identify the cause of the time increase. You can make use of the "time" library to identify taken by different components of code in the new addition.
I suspect two reasons:
1. regex check
2. calling generate_candidates. Can we call candidate_variant_distance_calculation directly inside get_candidates_for_variant?