You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a page with ~50 images and it takes forever to build. Just take some existing project and copy an image directive a lot of times to see for yourself.
I have stopped it in the debugger and it hangs in the regex sub of plugin.py around line 139 where it tries to do all the replacements in one go. I guess the look back/ahead of the regex there degenerates when it sees that many image tags.
maybe using the find_all in regexes and then looping over the matches works better?
PS: I think the re.compile in the function would benefit from being on the class level to only be ever executed once
The text was updated successfully, but these errors were encountered:
I have a page with ~50 images and it takes forever to build. Just take some existing project and copy an image directive a lot of times to see for yourself.
I have stopped it in the debugger and it hangs in the regex sub of plugin.py around line 139 where it tries to do all the replacements in one go. I guess the look back/ahead of the regex there degenerates when it sees that many image tags.
maybe using the find_all in regexes and then looping over the matches works better?
PS: I think the re.compile in the function would benefit from being on the class level to only be ever executed once
The text was updated successfully, but these errors were encountered: