performance_optimization
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
performance_optimization [2021/01/16 11:18] – [General rules for optimizing your projects] emozolyak | performance_optimization [2023/05/03 08:54] – [General rules for optimizing your projects] emozolyak | ||
---|---|---|---|
Line 5: | Line 5: | ||
Schematically, | Schematically, | ||
- | {{ :: | + | {{ network: |
The kernel works cyclically. This means that all actions are performed sequentially. If delays occur at some stage, this affects the execution time of the entire cycle. | The kernel works cyclically. This means that all actions are performed sequentially. If delays occur at some stage, this affects the execution time of the entire cycle. | ||
Line 124: | Line 124: | ||
-Avoid using bulky dashboards (too rich in elements, having heavy-weight pictures etc. ), " | -Avoid using bulky dashboards (too rich in elements, having heavy-weight pictures etc. ), " | ||
-Set appropriate screen refresh time. | -Set appropriate screen refresh time. | ||
+ | -use templates for dashboards, alerts and others | ||
+ | -for Gantt diagrams, don't set too big time range | ||
=== Scripting === | === Scripting === | ||
Line 134: | Line 136: | ||
local cur_value = R(reg) | local cur_value = R(reg) | ||
| | ||
- | if (not cur_value) or (cur_value == new_value) then | + | if (not cur_value) or (not new_value) or (cur_value == new_value) then |
- | return | + | return |
else | else | ||
WriteReg(reg, | WriteReg(reg, | ||
end | end | ||
end | end | ||
- | </ | ||
- | |||
- | Use commenting you will understand next time you or someone will see you code. | ||
- | <code lua> | ||
- | ----------------------------------------CALC. DAY ECONOMY -------------------------------------------------- | ||
- | LimitMonthDayYesterday = GetReg(" | ||
- | HeatEnergyDay= GetReg(" | ||
- | WriteReg(" | ||
- | ------------------------------------------------------------------------------------------------------------ | ||
</ | </ | ||
Line 155: | Line 148: | ||
-Set appropriate timeout and tries in external connections | -Set appropriate timeout and tries in external connections | ||
-Organize and set different reading intervals for variables. E.g. for device settings (like PID coeficitens, | -Organize and set different reading intervals for variables. E.g. for device settings (like PID coeficitens, | ||
+ | -For mulitple external devices, you can use " | ||
+ | |||
+ | === Project editing === | ||
+ | |||
+ | -Keep the number of open tabs in browser minimal for the current session. If you need multiple tabs, use auto-close session checkbox to prevent unattended access. | ||
+ | -Avoid making multiple changes in series, like turning OFF-ON many regs, connection, scripts etc. Use save & apply feature of the latest fw. (apply all changes at once, instead of creating a queue for changes) | ||
+ | |||
+ | === Track Load Average parameter === | ||
+ | There is a metric register in the internal register showing mean number of the processes in the queue relative to the running process. There are 1, 5, 15 minutes mean paratemer. In a steady state, you 15 minutes metric should be below 1. | ||
+ | |||
+ | === Optimize log=== | ||
+ | -Minimize logging many registers to DB, set appropriate log speed for them. When setting 'use data from log' for the graphs, make sure you limit the log amount with the setting. | ||
+ | |||
+ | === Don't forget to remove debug log === | ||
- | -Keep the number of open tabs minimal for the current sessions. If you need multiple tabs, use auto-close session checkbox | + | Printing |
- | -During development, keep parameter Load Average below 1 | + | |
- | -Avoid making simultaneous changes at once, like turning OFF-ON many regs, connection, scripts etc. Use save & apply feature of the latest fw. (apply all changes at once, instead of creating a queue for changes..) | + | |
- | -Minimize | + | |
+ | === Keep some free space on the data storage === | ||
+ | When you have big database files and other log files, leaving small room for temporary files may affect your system performance too. Depending on storage size, leave some free space on it. E.g. for 1GB SD card 20% of free space is recommended. Use this [[system_settings# | ||
performance_optimization.txt · Last modified: 2023/05/03 08:54 by emozolyak