Catatan rilis ditulis dalam bahasa Inggris.
Lighter script code, and calls between scripts that run as ordinary calls
A memory release with a look ahead. A page's scripts are kept as text for as long as the page is open (the browser needs that text to show a function's source and to point at the line an error came from), and a large site keeps megabytes of it. Floati now keeps that text compressed while the page is idle, functions that spell the same parameters share one copy of them, and the bookkeeping the fast compiler keeps for every function is made only when a function is first called. Small pictures far down a page, or hidden in menus, now give their memory back the way large ones already did. Underneath, a call from one script into a function that another script compiled separately (code made by eval, for example) now runs as an ordinary call instead of starting a new run each time, so it is cheaper, keeps a full error trace and reaches the fast compilers. That is also the groundwork for the next big step in memory: compiling a function only when it first runs. On a typical large page about 70 percent of the compiled code is never run. That feature is built and tested in this release but stays switched off until it is as fast as it is light (today it saves about 4 percent of memory on script-heavy pages and costs about 6 percent of script time). Next, Floati turns to finishing the web platform itself: the remaining Web APIs and DOM interfaces, measured against the reference browser.
Script code takes less memory
Three changes to how Floati stores a page's scripts, each measured with the change on and off on the same page. First, the script text: when the page goes idle, every script text nothing is reading is compressed with Floati's own compressor (the same one its PDF writer uses), on a background thread so the page never waits, and unpacked again on the rare occasion something needs it. Second, parameter lists: minified code names parameters e, t, n over and over, and each of a large page's 27,000 functions kept two private copies of its list; now every list is stored once. Third, compiler bookkeeping: every function carried about 100 bytes of empty slots for the fast compilers, and most functions on a page are never called, so those slots are now made on a function's first call.
What comes next: compile only what runs
Floati compiles every function of a script when the script loads, and keeps the result. Measured on a phone company's page, 71 percent of that compiled code belongs to functions that never run. Leading engines compile a function only when it is first called; Floati now can too, and this release ships the parts it needs: calls between separately compiled code, a parser that skims a function body it will not need yet, and every compiler tier working on such functions. It is switched off for now because it is not yet free: on script-heavy pages it saves about 4 percent of memory but costs about 6 percent of script time. Floati only turns on what costs nothing, so the remaining cost comes first.
Apa yang berubah
15 perubahan- Memori dan membacaScript text is kept compressed while a page is idle (on a background thread, unpacked when something needs it): about 6 MB less on a phone company's page.
- Memori dan membacaFunctions that spell the same parameter list share one copy of it instead of two private copies each: about 7 MB less live memory on the same page.
- Memori dan membacaThe bookkeeping the fast compilers keep for a function is made on its first call, not for every function a page defines: about 2 MB less.
- Memori dan membacaThe per-function cache the inlining compiler uses is made the first time a function is inlined, not for every function.
- Memori dan membacaSmall pictures far from the screen or hidden in menus give their memory back (the floor was 256 KB of pixels, now 32 KB) and are decoded again in well under a millisecond when they come near: a news portal 224 -> 214 MB.
- JavaScript dan JITA call into a function compiled by another script (code made by eval or new Function) runs as an ordinary call on the same run instead of starting a nested one.
- RenderingAn error thrown inside such a call keeps the full list of callers in its stack trace, with the right line for each.
- RenderingA generator defined by the page and started from code made by eval now runs its body in the right place; it produced nothing before.
- JavaScript dan JITFunctions made by eval reach the fast compiler (they stayed on the interpreter), and the inlining compiler can now inline page functions called from them.
- RenderingThe box of an inline element around an image or inline block is as wide as its content but no taller than its line, as scripts measuring it expect.
- JavaScript dan JITGroundwork, switched off: functions can be compiled at their first call, with every compiler tier and every language rule working for them (tested with every function compiled late).
- JavaScript dan JITGroundwork, switched off: the parser can skim the body of a function that will be compiled later, so a called function is parsed once and a never-called one never.
- RenderingGroundwork, switched off: compiling late was made three times cheaper by finding a function's line from an index instead of counting the script's lines, and by deciding which functions qualify without reading them token by token.
- Memori dan membacaA new measuring tool counts every object, list, function and scope a page keeps (a phone company's page: about 100,000 objects and 104,000 functions), to choose the next memory work by what is really there.
- Memori dan membaca33 random popular sites total between 4,226 and 4,514 MB depending on the visit (several sites load a much heavier version at some times of day), against 10,377 MB in the reference browser; every change above is measured on and off on the same page.





