<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Frameworks, bruns.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19677">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Right now it introspects DBus and fetches properties all over the place.<br />
This patch changes UDisks Manager to be the governor of all device data,<br />
calling GetManagedObjects (which conveniently returns all the properties)<br />
on startup. It also connects to change signals and updates the cache<br />
accordingly and tells the devices about it.</p>
<p>This reduces impact of UDisks backend on Dolphin startup from 4.3% to 0.3%<br />
on my machine. On my laptop it spent 130ms on startup trying to figure out<br />
if something might be a optical drive or not...</p>
<p>Since I don't have an optical drive, it is likely that handling for these<br />
is broken in this patch, at least one FIXME is definitely breaking it :)</p>
<p>While it sheds quite some code and compacts property caching in a single place<br />
I'm not too happy about having this static Manager pointer in DeviceBackend,<br />
with both Manager telling the Device about changed properties and the Device<br />
asking the Manager about its properties.. Also, the Block directly accessing<br />
the Manager is somehwat awful.</p>
<p>Fix updating existing device when it gains new interfaces</p>
<p>So many hours wasted finding this...</p>
<p>Fix monitoring optical drives</p>
<p>We already listen to all change events anyway so rather than explicitly connecting<br />
to a certain path like the old one, we just process everything and try to figure out<br />
if it was meant for an optical drive whose disc became available.</p>
<p>For the lack of an optical drive, I tested it in VirtualBox where attaching and<br />
removing CD images worked fine now.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R245 Solid</div></div></div><br /><div><strong>BRANCH</strong><div><div>broulik/objectmanager</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19677">https://phabricator.kde.org/D19677</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/solid/devices/backends/udisks2/udisks2.h<br />
src/solid/devices/backends/udisks2/udisksblock.cpp<br />
src/solid/devices/backends/udisks2/udisksdevice.cpp<br />
src/solid/devices/backends/udisks2/udisksdevicebackend.cpp<br />
src/solid/devices/backends/udisks2/udisksdevicebackend.h<br />
src/solid/devices/backends/udisks2/udisksmanager.cpp<br />
src/solid/devices/backends/udisks2/udisksmanager.h</div></div></div><br /><div><strong>To: </strong>broulik, Frameworks, bruns<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>