Firefox OS/MappedArrayBuffer: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 3: Line 3:
: The feature allows to read data in packaged app by XHR with array buffer type as memory-mapped.
: The feature allows to read data in packaged app by XHR with array buffer type as memory-mapped.
: It helps to save RAM memory usage, especially for big data files in a packaged app. For example, when enabled, the word suggestion/auto correction or the IME database in the keyboard APP no longer consumes RAM memory.
: It helps to save RAM memory usage, especially for big data files in a packaged app. For example, when enabled, the word suggestion/auto correction or the IME database in the keyboard APP no longer consumes RAM memory.
== Use it or not? ==
To use this feature, the data file in the packaged app must be uncompressed. To determine whether to use it, you may want to consider these factors:
* RAM size
* Flash size
* File size
* File compression ratio


== Support status ==
== Support status ==
Line 34: Line 27:
[[File:Arraybuffer mapping.png|640px]]
[[File:Arraybuffer mapping.png|640px]]


:[1] Page size on 32-bits Linux is 4096 bytes.
:[1] Page size on 32-bits Linux is 4K bytes.
:[2] Bug 855669 - Figure out how emscripten &co can decommit memory
:[2] Bug 855669 - Figure out how emscripten &co can decommit memory
== Use it or not? ==
To determine whether to use it, you may want to consider these factors:
* RAM size
* Flash size
* File size
** There might be no memory saving when the file size belows 8K bytes.
* File compression ratio


== How to use it? ==
== How to use it? ==
148

edits

Navigation menu