Closed Bug 1224514 Opened 9 years ago Closed 8 years ago

[Messages][NG] We should shutdown MessagingService when app goes to background

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: azasypkin, Unassigned)

References

Details

Attachments

(1 file)

In this bug we'd like to try to shut down SharedWorker with MessagingService and wake it up once app is active again. This should allow us to save some memory. Ideally we should have single "manager" that will introduce this behavior for all services that we don't need when app is in background.
Going to experiment with this.
Assignee: nobody → azasypkin
Status: NEW → ASSIGNED
Comment on attachment 8690143 [details] [review] [gaia] azasypkin:bug-1224514-shutdown-shared-worker > mozilla-b2g:master Hey guys, Can I have your early feedback to validate the general idea? It isn't integrated into Messages app yet, but the idea should be clear. Especially I'm interested in what you think about: * lib/bridge/plugins/dispose/client.js; * lib/bridge/plugins/dispose/service.js; * services/js/client_disposer.js * services/js/worker_client.js Currently code is distributed within new bridge plugin and Messages app specific code, but it can be moved entirely to plugin or vice versa. Any ideas are welcome! You can also try it out in action using [1]. All you need to open [1] in one or several tabs (to simulate several clients), open about:debugging -> Workers - to see that worker is there or not (after disposal) and about:memory to see that memory has been freed. Please, tell me what you think! [1] http://nga-crash-tests.github.io/bridge-disposable/
Attachment #8690143 - Flags: feedback?(schung)
Attachment #8690143 - Flags: feedback?(felash)
I've rebased PR on the PR from bug 1229372, so please take a look at the second commit only :)
Blocks: 1198266
Comment on attachment 8690143 [details] [review] [gaia] azasypkin:bug-1224514-shutdown-shared-worker > mozilla-b2g:master Sorry about the late reviewing, and here is some brief summary: - I would prefer to integrate 2 parts into a pulgin, and maybe even push this plugin in bridge library. - Do we need a safer way to dispose service, or client side should be fully responsible for service disposing? - I'm neutral on dispose cancellation ability, and we might not need the dispose event to client. I think it's a good idea to terminate certain unnecessary service, left some more comments on github, thanks!
Attachment #8690143 - Flags: feedback?(schung) → feedback+
Comment on attachment 8690143 [details] [review] [gaia] azasypkin:bug-1224514-shutdown-shared-worker > mozilla-b2g:master good idea, I left comments on github (but the discussion is not over :) )
Attachment #8690143 - Flags: feedback?(felash) → feedback+
Thanks a lot for your feedback guys! Since it's not in a priority right now, unassigning it.
Assignee: azasypkin → nobody
Status: ASSIGNED → NEW
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: