[Cuis-dev] Design idea with persistence of objects
Juan Vuletich
juan at cuis.st
Mon Sep 21 06:45:53 PDT 2026
Hi Folks,
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.
HTH.
On 2026-09-21 8:39 AM, Hernán Wilkinson via Cuis-dev wrote:
> Hi Hilaire,
> have you tried doing a lazy loading? Do you need to load all the
> documents at once?
> 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.
>
> I hope this helps.
> Hernan.
>
> On Mon, Sep 21, 2026 at 6:57 AM Luciano Notarfrancesco via Cuis-dev
> <cuis-dev at lists.cuis.st> wrote:
>
> 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.
>
> On Sun, 20 Sep 2026 at 17:53 Hilaire Fernandes via Cuis-dev
> <cuis-dev at lists.cuis.st> wrote:
>
> Hi,
>
> I am looking for idea and design idea regarding persistence of
> objects.
>
> In the DyboApp, the user data are saved in a tree of objects
>
> * userData (root)
> o schools
> + classGroups
> # courses
> * topics
> o documents
>
> 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.
>
> 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.
>
> 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.
>
> I have some ideas how to improve this, but I am interested to
> read other opinions and experience on the matter.
>
> Thanks
>
>
> --
> http://mamot.fr/@drgeo
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
>
>
> --
> *Hernán Wilkinson
> Agile Software Development, Teaching & Coaching*
> *Phone: +54-011*-4893-2057
> *Twitter: @HernanWilkinson*
> *site: http://www.10Pines.com <http://www.10pines.com/>*
> Address: Alem 896, Floor 6, Buenos Aires, Argentina
>
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260921/345ed06c/attachment.htm>
More information about the Cuis-dev
mailing list