You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I discovered that the battery of my mobile phone discharged quite fast. After looking at the battery settings I saw that 55% of the battery power was used by the ownCloud client. I disabled the android client for the rest of the day and enabled it at the evening again. Immediately it starts to connect to the ownCloud server again and starts loading.
I looked at the access.log of the ownCloud server and discovered that the android clients sends a lot of requests to the server, like:
It seems that it sends this request for every single file in my ownCloud. This can take really long and consume a lot of battery power for users with a lot of files.
I wonder why we don't send this requests only on demand for the files/folder we need the information?
Edit: After a few hours I even see repeated requests in my log, it seems that there is an endless loop sending this API calls.
When we implemented the refresh the shared files in the file list, we ask for shared files/folders for the current folder when changing the folder in the file list.
In our test we haven't noticed this behavior, but we'll take a look to ensure this works properly.
I need more details about your environment to try to reproduce the problem: device (Android version) and ownCloud server version. Could you provide me this information?
I need more details about your environment to try to reproduce the problem: device (Android version) and ownCloud server version. Could you provide me this information?
Sure, device is a Samsung Galaxy Note 2 (GT-N7100) Android Version 4.3. Server: ownCloud 6.0.1
As a additional note, this seems to happen only if I enable the auto sync in the android settings for the ownCloud client.
First issue: the sync seems to be triggered too often, at least once every 2-3 minutes or so. It is not configurable in Android, so not sure whether it's correct.
Second issue: the sharing info is queried for all folders and subfolders even though the app isn't visible. I'd expect it to only retrieve the share info of the currently visible folder, not traversing all the folders. This means that if someone has many many subfolders it will take a long time for all the calls to be done which will hammer the server needlessly and also drain the battery.
I did another test when the ownCloud app is opened in the root, but the result is the same: all directories are traversed.
same behavior here! I have one file selected to keep in sync. Since the update to 1.5.4 the battery drains, but it depends on the network speed. If I'm on Wireless-LAN, it will be not noticeable. If I'm on a mobile Network, especially a slow one, the phone gets really hot and the battery drains fast.
@rperezb yes I saw the update yesterday. Syncing seemed to be a bit faster.
The "share" requests are now limited to the directory I am currently browsing, so it looks like this part is fixes.
The PROPFIND is still traversing all subdirs, but I suppose that it's expected. Shouldn't it be possible to just PROPFIND the root dir to find out whether there are changes, and only traverse if the etag has changed ? (probably a separate issue)
@PVince81 , yes, we tried to implement that this time, but found some problems. We think we can avoid it, but need to try it carefully and the impact of share requests was quite important to make it wait.
I tried the latest release and everything seems to work again. 😄 Even with automatic sync enabled the client no longer updates the share information for ever. So from my side this issue is solved. Thanks!
Activity
masensio commentedon Feb 27, 2014
Hi @schiesbn,
Thanks for your feedback.
When we implemented the refresh the shared files in the file list, we ask for shared files/folders for the current folder when changing the folder in the file list.
In our test we haven't noticed this behavior, but we'll take a look to ensure this works properly.
I need more details about your environment to try to reproduce the problem: device (Android version) and ownCloud server version. Could you provide me this information?
Thanks in advance.
schiessle commentedon Feb 27, 2014
Sure, device is a Samsung Galaxy Note 2 (GT-N7100) Android Version 4.3. Server: ownCloud 6.0.1
As a additional note, this seems to happen only if I enable the auto sync in the android settings for the ownCloud client.
PVince81 commentedon Feb 28, 2014
I can confirm this and see two different issues.
First, here are the steps to reproduce the issue:
First issue: the sync seems to be triggered too often, at least once every 2-3 minutes or so. It is not configurable in Android, so not sure whether it's correct.
Second issue: the sharing info is queried for all folders and subfolders even though the app isn't visible. I'd expect it to only retrieve the share info of the currently visible folder, not traversing all the folders. This means that if someone has many many subfolders it will take a long time for all the calls to be done which will hammer the server needlessly and also drain the battery.
I did another test when the ownCloud app is opened in the root, but the result is the same: all directories are traversed.
Device specs: Nexus 4 with Android 4.4.2
davivel commentedon Feb 28, 2014
Interesting point: no need to get shares in the full-synchronization process. I think this is the best one (at least regarding shares).
But we'll have to take care of the current folder if a refresh for full account is triggered.
pgschk commentedon Mar 2, 2014
Can confirm for this combination:
Server:
Client:
Happy to do any testing if needed
netAction commentedon Mar 10, 2014
I have the same logfile and the same issue with Android sync.
Server 6.0.1
Client 1.5.4
pmarasse commentedon Mar 12, 2014
I'm experiencing a similar behavior since a few days on my phone (file sync activated on my OC account), but not on my tablet (file sync disabled)
Server : 6.0.2-1 on Debian 7
Client 1.5.4 (dev branch)
Device : Sony Xperia ARC-S Android 4.0.4
All of my path are scanned endlessly, logcat output looks like this for one path :
https://orthanc.archigny.net/mydrive/public.php?service=files&t=04cdeda6c2eecdd9865be0f9102724c4
ufgum commentedon Mar 18, 2014
same behavior here! I have one file selected to keep in sync. Since the update to 1.5.4 the battery drains, but it depends on the network speed. If I'm on Wireless-LAN, it will be not noticeable. If I'm on a mobile Network, especially a slow one, the phone gets really hot and the battery drains fast.
ownCloud 6.0.2 (stable)
Client 1.5.4
Android 4.2.2
rperezb commentedon Mar 26, 2014
Hey, we have just released a new version of the app, 1.5.5
It is included to improve the battery usage, can you test it?
thx
PVince81 commentedon Mar 27, 2014
@rperezb yes I saw the update yesterday. Syncing seemed to be a bit faster.
The "share" requests are now limited to the directory I am currently browsing, so it looks like this part is fixes.
The PROPFIND is still traversing all subdirs, but I suppose that it's expected. Shouldn't it be possible to just PROPFIND the root dir to find out whether there are changes, and only traverse if the etag has changed ? (probably a separate issue)
davivel commentedon Mar 27, 2014
@PVince81 , yes, we tried to implement that this time, but found some problems. We think we can avoid it, but need to try it carefully and the impact of share requests was quite important to make it wait.
A separate issue sounds fine.
schiessle commentedon Apr 4, 2014
I tried the latest release and everything seems to work again. 😄 Even with automatic sync enabled the client no longer updates the share information for ever. So from my side this issue is solved. Thanks!
Fukurokudzu commentedon Apr 20, 2014
Looks like i have high battery usage with 1.5.5 now. I've LG G2, and 4.4.2.
pgschk commentedon Apr 21, 2014
Looks fixed for me 4.4.2 and 1.5.5
DPTJKKVH commentedon May 8, 2014
The problem still persists in 1.5.5 but only on a directory level. But still it syncs in an endless loop. oC 6.0.2 here.
davivel commentedon May 22, 2014
Since this issue was about the Share API calls, let's give it as solved and continue the discussion about battery and syncing in #462.
Thanks.
Merge pull request #415 from owncloud/bump_kotlin_gradle