Payments still slow via One-to-Many; smart-field edit & filter issues (Agent 1.64.5, datasource-mongoose 1.8.9, legacy flatten mode)

Context (previous thread):
Extremely slow loading of Payments collection, https://community.forestadmin.com/t/extremely-slow-loading-of-payments-collection-in-forest-admin-agent-1-64-5-datasource-mongoose-1-8-9/8224/9

Versions:

  • @forestadmin/agent 1.64.5

  • @forestadmin/datasource-mongoose 1.8.9

  • Current flattening: legacy (only as a temporary workaround)

Problems (concise):

  1. Performance: Legacy fixes the main Payments list, but opening Payments via one-to-many (Payout → Payments) is still very slow.

  2. Editing: Smart fields created with addField are not editable in the UI even with replaceFieldWriting.

  3. Search/Filters: To search those smart fields we added replaceFieldOperator handlers, but those fields don’t behave in the filter builder / aren’t usable as filters.

Request / Preference:

  • Guidance to resolve O2M performance and smart-field edit/filter behavior.

  • Prefer a solution that does not rely on legacy flattening, if possible (legacy is only a stop-gap for performance).

  • We can’t share full schema/aggregations publicly; if needed, please initiate a private discussion or schedule a short call to review schema and profiling data.

Hi Ilyas,

Let’s look at your problems:

  1. Sadly, this problem can’t be fixed easily. We can analyse your situation to help you find the best solution. To reproduce your detailed configuration, please share it with us (in private if you prefer) along with your models. A simplified model reproducing the situation is required; please also anonymize/rename any private data.

  2. It seems this field was initially read-only; please uncheck ‘read-only’ config from the layout editor. Link to doc

  3. A quick win may be the same as the previous problem: please look at the same place to activate the filter. (in the filters dropdown, activate the filter)

Best regards,
Slim