-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate QTVCP logger from INI parser #3243
Comments
The Logger does not pull in the Info library, the Info library is imported later in the gladevcp.py file.
Once we agree on common INI entries this problem practically goes away. Maybe a better half way fix is to have the Info library check for gmoccpy relevant entries and convert them to Info ones. But I think it would be best in the long run if we just decide on the best entries and both use them. |
Ok sorry, my fault.
Can you give an example of one?
Yeah but isn't it the duty of the GUI to check if there are all required information available in the INI?
Yes maybe the warnings disappear mostly but still a performance issue... |
What is the performance hit if you start with -q verses with warnings printed? I guess I don't really understand why you wouldn't just fix the INI to stop the warnings if it bothers you. Now if you are talking about a VCP that stands alone, with no linuxcnc running, it already sets the logging to critical. |
The INI file is still being read several times. Sure not a big thing but if nobody cares about code efficiency... |
Parsing ini files shouldn't impact startup time. What may be noticeable is writing log messages, a proper logging framework does buffer flush and fsync after each log entry, and that can be expensive. |
|
I think it would be good to separate the QTVCP logger from Qt_Istat (INI value parsing).
The logger is used in Gmoccapy, QtVCP, Gscreen, Gladevcp ...
Currently, when using the QtVCP logger it also invokes the reading of the INI file.
This is
A bit a waste of resources and slows down the start. Every use of a VCP reads the INI file which is unnecessary.
E.g. when running the
gmoccapy_with_user_tabs.ini
sample config, the INI file is read four times without reason.It fills the log / console with messages that are not relevant and makes it harder to see the important messages.
For the above example it prints (when removing the "-q" option of the EMBED_TAB_COMMAND) :
@c-morley It would be great if you could implement that (I guess only a little thing for you).
The text was updated successfully, but these errors were encountered: