Mozilla launched Firefox's native PDF reader in Firefox 19 to provide users of the browser with an alternative to plugin-based readers such as Adobe PDF Reader or Foxit Reader.
The idea was to reduce the browser's dependency on plugins, and the creation of a native PDF reader did just that for PDF related plugins.
While built-in to the browser directly, Firefox users can still change the internal pdf viewer if they want to. This makes sense under certain circumstances, for instance when support for features is required that PDF.js does not support.
If you have been using Firefox's built-in PDF reader you may have noticed at times that memory consumption can shoot through the roof quite easily.
It is not uncommon that memory usage jumps by a couple of hundred Megabytes when opening pdf documents in PDF.js. While that depends largely on the document itself, it appears to be quite common that memory usage is higher than it should be.
Mozilla's master of memory Nicholas Nethercote just confirmed that improvements are coming to PDF.js that improve the program's memory consumption under certain conditions significantly.
He notes that the PDF viewers high memory consumption secured it a place on the top 5 list of Mozilla's MemShrink project.
Nicholas implemented four improvements that reduce the memory consumption greatly for certain kinds of documents:
The changes improve Firefox's built-in pdf reader significantly when documents that benefit from these optimizations are opened. This includes memory consumption mainly, but may also improve the loading time of pdf documents.
The changes will be released with Firefox 29, which means that Aurora and Nightly users benefit from them already.
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.