Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 833104 - Dont block the camera preview from loading during initialis... #7900

Merged
merged 1 commit into from
Feb 1, 2013
Merged

Bug 833104 - Dont block the camera preview from loading during initialis... #7900

merged 1 commit into from
Feb 1, 2013

Conversation

daleharvey
Copy link
Contributor

...ation

return r;
}

api.init = function() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have this module initialize itself as soon as it loads? That is, get rid of the init() function and just call asyncStorage.getItem right away? If you did that, you might want to move this script and asyncStorage up to the head of the document so they start running as soon as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept having varying results with attempting to do asyncstorage reads as well as anything else before the previewstream loaded, they all made it slower to some varying degree. right now the only thing that happens before the previewstream is some dom code required to show the preview stream, and some filmstrip self initialisation which didnt have a large impact (although it may be worth looking at in a follow up)

Plus it doesnt make any difference to our code whether its loaded early or not, we still have to handle the cases where asyncstorage hasnt loaded before the ui is activated

daleharvey added a commit that referenced this pull request Feb 1, 2013
Bug 833104 - Dont block the camera preview from loading during initialis...
@daleharvey daleharvey merged commit 2f0d508 into mozilla-b2g:master Feb 1, 2013
daleharvey added a commit that referenced this pull request Feb 2, 2013
Bug 833104 - Dont block the camera preview from loading during initialis...
daleharvey added a commit that referenced this pull request Feb 2, 2013
Bug 833104 - Dont block the camera preview from loading during initialis...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants