<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Folks,</p>
    <p>If users don't need all their documents loaded by default, I'd
      try lazy loading as Hernán says. Instead of a DiskProxy, store the
      information for the DiskProxy (file name or FileEntry I guess).
      Perhaps create a DocumentFile object that stands in place of the
      Document, so the user can see and manage all their documents
      before loading them. And get the DocumentFile to load the actual
      Document when the user actually needs it.</p>
    <p>HTH.</p>
    <div class="moz-cite-prefix">On 2026-09-21 8:39 AM, Hernán Wilkinson
      via Cuis-dev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGgF3Gzw0m6gFBsH6gc2n=_Wv67Pdyw+FUE5AhywEFdt02GTwg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Hilaire,
        <div> have you tried doing a lazy loading? Do you need to load
          all the documents at once? </div>
        <div> You could use proxies for the persistent objects you want
          to load lazily and only read the object from disk when needed,
          as ORM do when persisting in relational databases.</div>
        <div><br>
        </div>
        <div> I hope this helps.</div>
        <div> Hernan.</div>
      </div>
      <br>
      <div class="gmail_quote gmail_quote_container">
        <div dir="ltr" class="gmail_attr">On Mon, Sep 21, 2026 at
          6:57 AM Luciano Notarfrancesco via Cuis-dev <<a
            href="mailto:cuis-dev@lists.cuis.st" moz-do-not-send="true"
            class="moz-txt-link-freetext">cuis-dev@lists.cuis.st</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="auto">Image segments can be useful for superfast
            save/load of a graph of objects. I dont know how they
            compare with the serialization you are doing, it might be
            worth doing some tests to compare.</div>
          <div><br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Sun, 20 Sep 2026 at
                17:53 Hilaire Fernandes via Cuis-dev <<a
                  href="mailto:cuis-dev@lists.cuis.st" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">cuis-dev@lists.cuis.st</a>>
                wrote:<br>
              </div>
              <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div bgcolor="#FFFFFF">
                  <p><font size="4" style="color:rgb(0,0,0)">Hi, </font></p>
                  <p><font size="4" style="color:rgb(0,0,0)">I am
                      looking for idea and design idea regarding
                      persistence of objects.</font></p>
                  <p><font size="4" style="color:rgb(0,0,0)">In the
                      DyboApp, the user data are saved in a tree of
                      objects</font></p>
                  <ul>
                    <li><font size="4" style="color:rgb(0,0,0)">userData
                        (root)</font></li>
                    <ul>
                      <li><font size="4" style="color:rgb(0,0,0)">schools</font></li>
                      <ul>
                        <li><font size="4" style="color:rgb(0,0,0)">classGroups</font></li>
                        <ul>
                          <li><font size="4" style="color:rgb(0,0,0)">courses</font></li>
                          <ul>
                            <li><font size="4" style="color:rgb(0,0,0)">topics</font></li>
                            <ul>
                              <li><font size="4"
                                  style="color:rgb(0,0,0)">documents</font></li>
                            </ul>
                          </ul>
                        </ul>
                      </ul>
                    </ul>
                  </ul>
                  <p><font size="4" style="color:rgb(0,0,0)">The most
                      complex data are the documents. A document
                      represents a metaphor of pages with handwritten
                      notes, and an arbitrary number of tools, dropped
                      pictures from the host filer, etc. Moreover a page
                      may have a model as simple as a background color,
                      or a particular design as horizontal lines, grid,
                      graph paper or a pdf.</font></p>
                  <p><font size="4" style="color:rgb(0,0,0)">Because of
                      this complexity, I serialize the documents in
                      individual compressed files, it is fast at saving
                      and loading. Because serializing the userData root
                      save all the data by default, each Document
                      instances in the documents collection (at the
                      bottom of the tree above), are in fact DiskProxy
                      containing the path to the independently
                      serialized Document instances.</font></p>
                  <p><font size="4" style="color:rgb(0,0,0)">This works
                      well when saving the whole userData or an
                      individual Document. However, at start-up,
                      accessing the userData load everything, which is
                      fine expect for the documents collection and its
                      Documents instances (through the Disk proxy). As
                      the documents collection, it may become slow when
                      I will have several hundreds of documents.</font></p>
                  <p><font size="4" style="color:rgb(0,0,0)">I have some
                      ideas how to improve this, but I am interested to
                      read other opinions and experience on the matter.</font></p>
                  <p><font size="4" style="color:rgb(0,0,0)">Thanks</font></p>
                  <p><font size="4" style="color:rgb(0,0,0)"><br>
                    </font></p>
                  <pre cols="72" style="font-family:monospace">-- 
<a href="http://mamot.fr/@drgeo" style="font-family:monospace"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">http://mamot.fr/@drgeo</a></pre>
                </div>
                -- <br>
                Cuis-dev mailing list<br>
                <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">Cuis-dev@lists.cuis.st</a><br>
                <a
                  href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
              </blockquote>
            </div>
          </div>
          -- <br>
          Cuis-dev mailing list<br>
          <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">Cuis-dev@lists.cuis.st</a><br>
          <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
        </blockquote>
      </div>
      <div><br clear="all">
      </div>
      <div><br>
      </div>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div style="font-size:small">
                <div dir="ltr">
                  <div dir="ltr">
                    <div style="font-size:12.8px"><span
style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span
                            style="font-size:8pt"><span
                              style="font-size:small"><font size="2"><span
                                  style="font-weight:normal"><span
                                    style="font-weight:bold">Hernán
                                    Wilkinson</span><br>
                                  Agile Software Development, Teaching
                                  & Coaching</span></font></span></span></strong></span></div>
                    <div style="font-size:12.8px"><span
style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span
                            style="font-size:8pt"><span
                              style="font-size:small"><font size="2"><span
                                  style="font-weight:normal">Phone:
                                  +54-011</span></font></span></span></strong></span><font
                        face="tahoma, sans-serif" size="2">-4893-2057</font></div>
                    <div style="font-size:12.8px"><strong
style="font-family:tahoma,sans-serif;font-size:xx-small"><span
                          style="font-size:8pt"><span
                            style="font-size:small"><font size="2"><span
                                style="font-weight:normal">Twitter:
                                @HernanWilkinson</span></font></span></span></strong></div>
                    <div style="font-size:12.8px"><span
style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span
                            style="font-size:8pt"><span
                              style="font-size:small"><font size="2"><span
                                  style="font-weight:normal">site: <a
                                    href="http://www.10pines.com/"
                                    style="color:rgb(17,65,112)"
                                    target="_blank"
                                    moz-do-not-send="true">http://www.10Pines.com</a></span></font></span></span></strong></span></div>
                    <div style="font-size:12.8px"><font
                        face="tahoma, sans-serif"><span
                          style="border-collapse:collapse">Address: Alem
                          896</span></font>, Floor 6, Buenos Aires,
                      Argentina</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis.st">www.cuis.st</a>
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich</pre>
  </body>
</html>