D25018: Move ACPI battery information from /proc/acpi to /sys
José JORGE
noreply at phabricator.kde.org
Mon Nov 4 17:04:59 GMT 2019
jjorge added a comment.
In D25018#558503 <https://phabricator.kde.org/D25018#558503>, @ahiemstra wrote:
> Hmm, I would like to see some smarter sys file handling for this. Right now, multiple calls to getSysFileValue result in the same file being read from disk over and over. While the original implementation may not have been ideal either, the update function at least made sure the ACPI stuff got only read once per update. If you need some inspiration, Memory.c has a fairly decent implementation.
Are you sure this is a good idea? While previous update function readed only one file in /proc, like memory.c does, we read different files in /sys : one for each information. So this is not the same file readed over and over (and it is not read from disk as it is a virtual fs exposed by the kernel). Thanks.
REPOSITORY
R106 KSysguard
REVISION DETAIL
https://phabricator.kde.org/D25018
To: jjorge, davidedmundson, #plasma, ahiemstra
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191104/2b898b6e/attachment.html>
More information about the Plasma-devel
mailing list