I have a performance issue in a list_buffers replacement that I use where I mark the buffers with a P to indicate they are part of the currently active project.
Let's say the list of open buffers is list A, and the list of project files is list B. So, during dialog instantiation, I need to identify which items in list A are in the list B group.
I currently use a mechanism where I process list A line-by-line and do a regex search against list B. This works fine, except when the lists get large. My current project has over 1000 files in it, and I may have 200-300 buffers open at once. This makes the time to show the dialog a little sluggish.
I would like to hear ideas about how to speed this up. I had thought about encoding the project files/paths into a numeric digest (a la MD5) and doing a numeric lookup in an array instead of the regex. It may speed up the search but the time to encode everything may nullify any performance gain.