https://bugs.kde.org/show_bug.cgi?id=469445

Harald Sitter <sit...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sit...@kde.org

--- Comment #13 from Harald Sitter <sit...@kde.org> ---
I expect this is a bit awkward to solve unfortunately.

We'd have to change the storage format to something more involved like

[ScreenMappingV2][DisabledScreen][0:1edf1760-75dc-4d64-9639-42be2c16fb30]
Activity=1edf1760-75dc-4d64-9639-42be2c16fb30
ScreenId=0

[ScreenMappingV2][DisabledScreen][0:1edf1760-75dc-4d64-9639-42be2c16fb30][file:///home/me/idx/2015-02-14-395.sgf]
LastSeen=2023-07-03

The currently used internal data storage inside ScreenMapper isn't really
conducive for that though, it's a bunch of hash maps tracking the same data in
different ways. Which is a bit nightmarish to extend. It might make for overall
improved readability if we moved to a flat vector of `struct Item` instances,
those could then easily carry the LastSeen data.

I'm not sure it'd necessarily improve performance but we can always add more
hashing on top. There in fact a number of performance problems with
ScreenMapper and FolderModel that relate to the startup speed impact that also
need dealing though :(

+    struct Screen {
+        int id = -1;
+        QString activity;
+        std::optional<QUrl> url;
+    };
+
+    struct ScreenItem {
+        QUrl url;
+        bool enabled = false;
+        int lastSeen;
+        std::shared_ptr<Screen> screen;
+    };
+
+    QVector<std::shared_ptr<Screen>> m_screens;
+    QVector<std::shared_ptr<ScreenItem>> m_items;

This would then allow us to further refine the config format to include
enabledness as a property

[ScreenMappingV2][0:1edf1760-75dc-4d64-9639-42be2c16fb30][file:///home/me/idx/2015-02-14-395.sgf]
Enabled=true
LastSeen=2023-07-03

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to