Skip to content

High memory consumption when getting address book cards #32411

Open
@juliusknorr

Description

Filing here as an issue to collect findings, I'm not entirely sure if that is something we really can solve properly e.g. by streaming the individual card data rather than keeping them all in memory.

There seems to be at least some additional overhead from #19901 but the major impact is the database result that is loaded.

https://blackfire.io/profiles/93136cfc-7b78-4919-b8ae-5695c0e905e2/graph?settings%5Bdimension%5D=pmu&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=OCA%5CDAV%5CCardDAV%5CCardDavBackend%3A%3AgetCards&callname=main()&constraintDoc=

Screenshot 2022-05-16 at 09 09 55

Some useful queries:

select id, sum(char_length(carddata)) from oc_cards where addressbookid = 7;
select id, char_length(carddata) as size from oc_cards where addressbookid = 7 order by size;
select substring_index(carddata, '\n', 10) from oc_cards where id = 3296;

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions