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
I'm testing canvas performance on Android, and noticed some problems with IPC (servo/ipc-channel) there. Servo seems to be creating IPC 'shared memory' files on every canvas redraw, on the sdcard, and they remain there until you manually delete them. With a big animated canvas, this means megabytes every second, and if there's no more space, pages simply stop loading.
Of course, using the sdcard like this is also a performance problem. So I've changed the path of these files in ipc-channel to a small ramdisk/tmpfs I've created, and it caused a visible improvement in the smoothness of the canvas animation (no exact numbers yet, sorry).
I'm not too familiar with how exactly this works on Android, can we fix these problems somehow? It would be nice to not need to store these files at all, or write them to eg. /data/data/org.mozilla.servo What do you think? @pcwalton?
shmem should not be hitting the disk/flash at all.. the filesystem name should just be a name. If stuff is actually being written (especially living until they're deleted), it likely means that something about android's IPC/shmem isn't what servo is expecting.
The current code just works around a bunch of bionic bugs with shmem. I'd welcome any changes! If you do have to write anything to the app directory, we do have to be careful to get it from the application at startup, as AFAIK it's not actually constant and the app will actually only have write access to the "real" one (e.g. /data/data/org.mozilla.servo1).
I've been a little reluctant to move our minimum Android platform up so that we could try to share components with Gecko (so, WinXP, OSX 10.6, older Android, etc.). But maybe we could do that on a more component-level basis and use newer features in either components that either will stay Servo-only or have multiple codepaths for different targets.
Activity
vvuk commentedon Dec 1, 2015
shmem should not be hitting the disk/flash at all.. the filesystem name should just be a name. If stuff is actually being written (especially living until they're deleted), it likely means that something about android's IPC/shmem isn't what servo is expecting.
larsbergstrom commentedon Dec 1, 2015
Thanks for finding this, @mmatyas!
The current code just works around a bunch of bionic bugs with shmem. I'd welcome any changes! If you do have to write anything to the app directory, we do have to be careful to get it from the application at startup, as AFAIK it's not actually constant and the app will actually only have write access to the "real" one (e.g.
/data/data/org.mozilla.servo1).pcwalton commentedon Dec 1, 2015
Ugh. This is exactly the reason why
memfdexists, but it's too new for us to rely on it.vvuk commentedon Dec 2, 2015
Hmm, why? Servo is forward looking, it should use forward looking tech.. especially on mobile :)
larsbergstrom commentedon Dec 2, 2015
I've been a little reluctant to move our minimum Android platform up so that we could try to share components with Gecko (so, WinXP, OSX 10.6, older Android, etc.). But maybe we could do that on a more component-level basis and use newer features in either components that either will stay Servo-only or have multiple codepaths for different targets.