Page 1 of 1
Doxygen
Posted: Thu Apr 17, 2025 3:12 pm
by jcbaar
We use doxygen to document much of our shared CTRL/CTRL++ code base. These comments can become pretty verbose. Since CTRL is a interpreted language, is there a performance impact when having many comments and sometimes pretty long ones?
I can imagine that initially loading and parsing the file will have a (small?) performance hit but I was wondering if there is also a "run-time" performance hit.
Regards,
Jan
Re: Doxygen
Posted: Fri Apr 18, 2025 1:43 pm
by hpuchegger
The use of comments in control code is fundamentally no different from other development languages in MHO.
They must be used carefully, but they are not subject to any limitations.
I tested a simple 1000x loop with dpSet without comments (file size 1 KB) and with 10,000,000 characters (file size 10 MB). The only difference was that while the 10 MB script took 7 seconds to initialize, it subsequently executed the code at the same speed.
Br, Herbert
Re: Doxygen
Posted: Tue Apr 22, 2025 1:41 pm
by jcbaar
I figured as much and I must say that I never noticed any performance issues (without ever benchmarking it) but I was wondering since our doxygen comments are important. Thanks for the reply and the test you ran. I honestly did not think of testing it that way myself.
Regards,
Jan