<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Memory usage increases with 20 MB style setting font change and closing the document doesn't free the memory"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=133667#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Memory usage increases with 20 MB style setting font change and closing the document doesn't free the memory"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=133667">bug 133667</a>
              from <span class="vcard"><a class="email" href="mailto:vmiklos@collabora.com" title="Miklos Vajna <vmiklos@collabora.com>"> <span class="fn">Miklos Vajna</span></a>
</span></b>
        <pre><span class="quote">> Is possible explain this a bit more in detail, what the 'cache' does.</span >

Sure. If you don't cache vcl-level text layout calls, then let's say you want
to draw "foo bar" on the screen. First you measure the text if "foo bar" fits
into the current line, or perhaps you need to break it down to "foo" and "bar"
(for that, you need to find a break point which is earlier than the end of
"bar"), and finally you want to draw the text. Without a cache, this means we
lay out the text (turn an unicode string into a list of positioned glyphs) at
least 3 times, sometimes even more.

The cache means that in case we already know the positioned glyph list of e.g.
"foo", we don't call into harfbuzz to lay it out again.

<span class="quote">>What a layout run triggers. And when the layout run ends.. </span >

If you change the document model in any way (like press a key), you need to
(incrementally) update the layout, then the rendering can draw the layout. So
the layout run happens every time anything changes in the document that affects
rendering. Pressing a key, inserting a new paragraph, etc.

Export to an editable file format typically doesn't change the document (ODT,
DOCX, etc), so should not trigger a layout run.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>