Effectively transfer notifications between decoupled projection layers

I am updating the design where the data was easily associated with the user interface:

class Object {
    UI * ui;
};


class UI {
    Object * object;
};

It was quite simple to send update notifications to ui using the user interface pointer, but the new requirements are for data to be completely separate from the user interface, as well as for different objects, in order to have several different user interface views, so one interface pointer is no longer does it also cannot be part of the data layer.

It is impossible to use something like QObjectsignals due to its overhead due to the high number of objects (in the range of hundreds of millions) and QObjectseveral times larger than the largest object in the hierarchy. For the part of the user interface, this does not matter much, since only a part of the objects is visible at a time.

I implemented a UI registry that uses a multi-step system to store all user interfaces using Object *as a key to be able to receive a user interface for a given object and send notifications, but searching and registering and deregistering user interfaces represent significant overhead, given the high rate of the object .

, , - ?

: , , . , , , , , . , , , , .

+4
2

.

" UI" Proxy UI Proxy.

Proxy , . QObject Object, Qt.

Proxy UI Object, "" , .

, UI Object, Proxy , .

, , hasProxy ( , ), , - . , Object , , "" , - . , , , , , .

, :

  • , . 8 Proxy -

  • , , ,

  • , , - , , QQuickItem , QML Item

  • , , , ,

  • , CPU . , , .

:)

0

-. , , .

, UI, . , Object s, .

: , , Object obj, obj, . , , , - Object , , . , Object, "update-UI-state".

- , , .

+1

All Articles