Closed
Bug 959603
Opened 11 years ago
Closed 7 years ago
poppit could tune ig.Sound.channels to improve memory usage
Categories
(Tech Evangelism Graveyard :: Preinstalled B2G Apps, defect, P4)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: bkelly, Assigned: jmunck, NeedInfo)
References
Details
(Keywords: perf, Whiteboard: [c=memory p= s= u=][MemShrink:P2])
While investigating bug 957346 I discovered that a little more than half the 70MB memory in use by poppit was due to loading the game sounds. In particular, impactjs loads each sound multiple times in order to allow them to be played simultaneously. With the HTML5 audio element this results in duplicated decoded audio data and decoder library resources.
Currently impactjs loads each sound resource 4 times by default. This can be tuned using the |ig.Sound.channels| property before calling |ig.main()|. See the documentation here:
http://impactjs.com/documentation/class-reference/sound#ig-sound-channels
From playing poppit, it seems unlikely that the game needs to a full 4 channels for each sound effect. It would be nice if we could talk to the game developer about possibly tuning |ig.Sound.channels| to 2 or 3. This would reduce the memory footprint of the game by around 10MB to 20MB which is quite significant.
Reporter | ||
Comment 1•11 years ago
|
||
Elisa, do you know who we could talk to about possibly tuning this value in poppit on fxos? Thanks!
Flags: needinfo?(ehelton)
Comment 2•11 years ago
|
||
Elisa no longer works for Mozilla, so I'm redirecting this to Karen.
Flags: needinfo?(ehelton) → needinfo?(kward)
Updated•11 years ago
|
Blocks: b2g-poppit
Reporter | ||
Comment 3•11 years ago
|
||
Or even better, we should encourage the software vendor to try the git version of impactjs which has been re-written to use Web Audio for sounds. I dropped in this version of the code into poppit and saw memory usage drop from ~70MB to ~40MB.
Updated•11 years ago
|
Whiteboard: [c= p= s= u=][memshrink] → [c=memory p= s= u=][memshrink]
Comment 4•11 years ago
|
||
adding Harald and Louis to cc. Will one of you reach out to Poppit with this suggestion?
Flags: needinfo?(kward)
Comment 5•11 years ago
|
||
I'll get in touch with them. If the game worked just fine with the latest stable release that would be a swell upgrade path.
Assignee: nobody → hkirschner
Reporter | ||
Comment 6•11 years ago
|
||
(In reply to Harald Kirschner :digitarald from comment #5)
> I'll get in touch with them. If the game worked just fine with the latest
> stable release that would be a swell upgrade path.
The Web Audio implementation of impactjs is not quite released yet. I've been told "in the next few weeks". I believe it will be in impactjs 1.24 when it is available. The game developer should also have access to the git repo which contains the implementation as well.
![]() |
||
Updated•11 years ago
|
Whiteboard: [c=memory p= s= u=][memshrink] → [c=memory p= s= u=][MemShrink:P2]
Comment 8•11 years ago
|
||
Julia, please review and provide a fix date. Thank you
Assignee: hkirschner → jmunck
Flags: needinfo?(jmunck)
Comment 10•11 years ago
|
||
Are there any updates regarding this bug?
Comment 11•7 years ago
|
||
Mass closing on Tech Evangelism::Preinstalled B2G App as Firefox OS is no longer a thing.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Comment 12•7 years ago
|
||
Mass closing on Tech Evangelism::Preinstalled B2G App as Firefox OS is no longer a thing.
Comment 13•7 years ago
|
||
Mass closing on Tech Evangelism::Preinstalled B2G App as Firefox OS is no longer a thing.
Updated•6 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•