Yeah instead of hashing I could have 4 cache variables "just" compare that (font, size, zoom and ascent+descent). Indeed that would avoid clashes, and it only requires keeping one copy of the previous font string around, and I guess the memory impact is probably not relevant.
I'm not sure it'd be much faster, but possibly. The advantage I see with the hash approach is that it makes it simpler as there's a single comparison instead of 4 to combine, and only one value to keep, instead of having the 4 prev + 4 old ones. I'll check, but I don't think speed matters -- clash might be relevant though. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786107
