Page 1 of 1

LAN-Plugin used a lot of power

Posted: 2018-10-21, 16:19 UTC
by 33kk99
https://play.google.com/store/apps/details?id=me.piebridge.brevent

In general, we will use a similar tool to ensure that the app exits to save power.
Plugins cannot be added to the power save list can cause errors during use.
FTP and WiFi plugins don't add the list then work fine, normal power consumption.
After the LAN plug-in is launched once, even if you exit, it will use a lot of power in the subsequent time.

Re: LAN-Plugin used a lot of power

Posted: 2018-10-22, 13:55 UTC
by ghisler(Author)
That's strange, it should use any CPU power at all when not used. Do you connect via SMB1 or SMB2?

Re: LAN-Plugin used a lot of power

Posted: 2018-10-23, 13:10 UTC
by 33kk99
Smb2, server had disabled smb1.

Re: LAN-Plugin used a lot of power

Posted: 2018-10-23, 13:57 UTC
by ghisler(Author)
I see - it looks like the SMB2 library doesn't have a disconnect function - the connection stays open in the background. But this shouldn't cause any activity as long as there is no data traffic...

Re: LAN-Plugin used a lot of power

Posted: 2018-10-25, 02:45 UTC
by 33kk99
Reproduce the problem and try to solve it?

Re: LAN-Plugin used a lot of power

Posted: 2018-10-29, 15:14 UTC
by ghisler(Author)
I have tried to reproduce the problem:
1. Connect via SMB2
2. Check with app "System Panel" - the plugin has used 1s CPU
3. Checked an hour later - the plugin has still only used 1s CPU
4. Checked again 3 hours later - the plugin has disappeared from the active tasks

I have also checked the source of the SMB library - there is just one background thread, and it sits idle, waiting on InputStream.read().
Sorry, I have no idea how I should reproduce your findings.