Re: [Patch] LaTeX: improve equation edit dialog

From: Dominic Lachowicz <>
Date: Wed Apr 09 2008 - 22:26:27 CEST

Hi Xun,

+ if (m_sBackupLatex.size())
+ m_sBackupLatex.clear();

Please just call clear().

+ if (m_sBackupLatex.size() == m_sLatex.size())
+ if (m_sBackupLatex == m_sLatex)
+ return;

I'd avoid the size() check. Any smart operator== will do this (our
UT_XXXString classes aren't smart about this. I'll fix that in a
moment). Besides, we aren't talking about comparing megabytes of data
where the only change happens near the end.

If there is a demonstrable performance concern, we should use a CRC or
some other hash. That would save on both speed and memory.

But for now, these are both premature "optimizations".

Received on Wed Apr 9 22:45:01 2008

This archive was generated by hypermail 2.1.8 : Wed Apr 09 2008 - 22:45:01 CEST