PERF: Memoize PostRevisor#diff_size (PR #8939)

Although this method is usually called twice, its execution can take about 1s.


You’ve signed the CLA, udan11. Thank you! This pull request is ready for review.

Nice :+1: How did you find it?

It took me ~9s to edit a post. This combined with 8e27fa1bd871272ee923ef948703afc02fb12e25 reduces it to ~1s, which is still more than I’d like, but makes it a bit more manageable.

1 Like

I’m curious, is there a particular piece of code that is taking most of the time? ONPDiff perhaps?

1 Like

Yep, ONPDiff is the culprit. It seems that it still does not handle very large cases very well.

1 Like