omnivore
omnivore copied to clipboard
Search speedup ideas
- instead of iterating through lines using a slow python list comprehension, scan through the numpy array of instructions, throwing out any matches that cross instruction boundaries
- explore regex matching using a C library
- speed up get_entire_style_ranges (seems to be a big bottleneck when profiling)
Have the searchers directly fill the style array with the match bit! This will also handle the cases where multiple searchers match, because a parallel array with length of match would be checked for any existing length before saving it.