Review Request 122470: Optimize DataSource

Aleix Pol Gonzalez aleixpol at kde.org
Sun Feb 8 17:31:16 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122470/#review75620
-----------------------------------------------------------


LGTM


src/declarativeimports/core/datasource.cpp
<https://git.reviewboard.kde.org/r/122470/#comment52294>

    Why this empty comment?


Maybe it would be better to align all data sources and make them wake up at the same time rather than having separate timers for all of them.

- Aleix Pol Gonzalez


On Feb. 7, 2015, 11:21 p.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122470/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2015, 11:21 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> This optimizes the DataSource Item.
> 
> - Use QQmlParserStatus to provide event compression for the setupData() method so it is only called once all the bindings have been setup, it used to be called repeatedly a lot
> - Split setting up the binding outside of setupData, so connections like "connectedSources: sources" work with this new approach (that consumer thing looks like it leaks)
> - Re-introduce interval alignment, this allows the clock to use a 60s interval for polling and align to the minute, need to use int since we cannot pass an enum defined in a different class
> - Cache sources() and emit change signal only when it has actually changed
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/datasource.h 3aaa2bb 
>   src/declarativeimports/core/datasource.cpp 759e5f4 
> 
> Diff: https://git.reviewboard.kde.org/r/122470/diff/
> 
> 
> Testing
> -------
> 
> Battery monitor, which does crazy things to the data source works, media controller works, and the clock is able to align to the minute. Could potentially speed up applet initialization a little.
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150208/7e9a3200/attachment.html>


More information about the Plasma-devel mailing list