Abdelrazak Younes wrote:
Asger Ottar Alstrup wrote:
I've changed it. Please test. There is a fair chance this gives a nice speedup, maybe even on MacOS as well.

That would be an easy way out but I am not convinced... Visually speaking, all these if are not very nice...

*You* are taking the easy way out.

I guess it's time for a little C++ quiz.

Look at this line of code:

        lyxerr[Debug::PAINTING] << "draw " << std::string(str.toUtf8())
                << " at " << x << "," << y << std::endl;

First, the easy question: How many memory allocations are involved?

Then a little harder question: Do you know how expensive memory allocation is?

And then the conclusion: Is it such a great idea to do that?

Regards,
Asger

Reply via email to