• Show log

    Commit

  • Hash : 90795210
    Author : Ben Wagner
    Date : 2022-06-15T16:07:22

    [type1] Directly search for eexec in private dict
    
    This code originally just searched for `eexec`. This was later modified
    to check that the `eexec` found is valid (not in a string or comment).
    This was done by searching for `eexec` as before and then, for each
    `eexec` found, searching from the beginning using the correct parsing to
    see if the `eexec` was still found. If the private dictionary is large
    and contains many copies of `eexec` which are not valid, the initial
    part of the private dictionary is scanned once for each, potentially
    leading to n^2 parsing time.
    
    Instead of finding an initial `eexec` and then re-parsing to discover if
    it is valid, drop the initial search for `eexec` and just parse to find
    a valid `eexec`. This is strictly faster since the validation must
    happen anyway and avoids restarting from the beginning each time an
    `eexec` is found in the data.
    
    * src/type1/t1parse.c (T1_Get_Private_Dict): avoid n^2 parsing
    
    Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1328883