Open mpvader opened 3 years ago
vedirect-interface branch is here: https://github.com/victronenergy/vedirect_interface/commits/thiemo/WIP_dict_updates
velib branches are here: https://github.com/victronenergy/velib/tree/thiemo/WIP_Item_Dict_Leafs https://github.com/victronenergy/velib/tree/thiemo/WIP_Item_Dict_Producer (added)
velib_python is here: https://github.com/victronenergy/velib_python/tree/dict_updates
Some results from testing.
This was tested vs an unmodified setup.
System has:
CPU use:
CPU idle: +-30%
CPU use:
CPU idle: +-40% (handsome improvement)
System has:
Another two simulated solarchargers were added, for a total of 7 simulated and 2 real solarchargers (plus a BMV).
@mpvader I remember now what's holding back improvements on the QT projects.
There is a velib branch (thiemo/WIP_Item_Dict_Leafs
) that implements the sending of multiple values in a single message, but only for C
projects (this was used for vedirect-interface when doing this evaluation). A C++ implementation is needed.
That same branch has code for receiving multiple values in a single message. This does have a C++ version and was used during testing in the GUI.
velib_python
has a dict_updates
branch that is fully up to date (python3 ready). It implements a context manager that can be used with a with
statement, and it sends everything that happens inside that block together in one message.
What is needed is a C++ implementation that allows grouping and sending multiple values in one PropertiesChanged
message.
Reducing D-Bus traffic - increasing scalability
For example a solar charger, sends multiple PropertiesChanged signals every second, one for each D-Bus path. Also cgwacs and dbus-fronius do: 9 signals per second per PV inverter. And for reference, on a CCGX, the max signals per second is approx 30.
The idea is to send only one every (for example) second, from root, with a Dict with all paths that have an updated value.
The plan:
Services that consume (and thus need updating first)
Consumers that are not immediately required:
Producers of highest prio:
Producers that can be done some day:
Python:
C:
Cpp:
Notes per language:
Python:
In the majority of cases all that is required is updating velib_python after merging dict_updates. In some cases, a project might need a small change, ie. using the
with
statement notation, to send updates in a batch.