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
When I profile my blog build, about 60% of the time spent in markdown2.py is spent running SHA hashes.
Could you explain the logic of _hash_html_block_sub and _hash_text generally? Why are we even running SHA inside a markdown converter?
It looks like... this is some some of escape mechanism, maybe? Like we generate a key, replace the HTML with the key (so it doesn't look like HTML to some other stage of the parser that should ignore it), do some processing on the outer HTML, and finally replace all the keys with the original HTML?
That could be served just as well by generating a random string rather than a hash, if so?
Activity
Replace SHA function by random IDs
Replace SHA function by something very fast
Replace SHA function by something very fast
Replace SHA function by something very fast