Test compilation of hard coded Maxima backend keywords approach
ClosedPublic

Authored by filipesaraiva on Feb 18 2017, 4:18 PM.

Details

Summary

This patch is related with drop keywords.txt files in Cantor backends (T5037), more specifically with Maxima backend (T5214).

@arieder told us in T5037#73870 the hard coded approach was originally used in Maxima backend but it was replaced because that required a lot amount of time during the compilation (sometimes the compilation never ended). In my tests I could verify it was happening yet.

@asemke suggests in T5037#73887 to split the attribution of the variables in order to mitigate this problem. I did it and really the amount of time was reduced after that.

Please guys, could you just test in your machines if this patch get not too much time to compile Cantor? I want just it tested in other machines.

Test Plan
  • Apply the patch;
  • Compile Cantor;
  • Watch if the time for compilation is not much large and if the compilation doesn't freeze in some point.

Diff Detail

Repository
R55 Cantor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asemke accepted this revision.EditedFeb 19 2017, 7:13 PM

On my notebook with i5-5200 it takes ca. 5 seconds to compile maximakeywords.cpp in debug build with this change. On older CPUs this will take longer. But this is ok. Let's pay this at compile time rather then at run-time.

It should become more faster if you further split those 100 lines each having three or four << operators into single line and single operator calls like
m_variables << QLatin1String("_");
m_variables << QLatin1String("__");
m_variables << QLatin1String("%");
etc.
I could imagine the compile is more faster with parsing this version of the code.

This revision is now accepted and ready to land.Feb 19 2017, 7:13 PM
This revision was automatically updated to reflect the committed changes.