Thank you for mentioning this, and I hope to hear more thoughts from you(as well as other people), so we can update the wiki page to recommend how to make best use of this feature.
As my understanding, the difference will be: 1. One time I/O(memory-allocated buffer) 2. Spreaded I/O(memory-mapped buffer). In user experience, the former is a longer one-time delay in the beginning, while the latter are shorter periodical delays on demand. IMHO, this might be a trade-off in difference scenarios. However, either case would introduce I/O when running in main thread. Thanks, Shianyow ----- Original Message ----- From: "Andrew Sutherland" <[email protected]> To: [email protected] Sent: Wednesday, August 6, 2014 2:50:38 PM Subject: Re: [b2g] New feature: Memory-mapped array buffer for XHR response On 08/06/2014 02:39 AM, Shian-Yow Wu wrote: > 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. It seems like this introduces the potential for main thread I/O on page faults. Is there an enforcement mechanism to prevent this being used in the main thread of the main process? The wiki page suggests it can be used anywhere (main process, child process, main thread, worker thread.) Is it recommended to only use it in a worker thread if possible? Andrew _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
