Generated list pages resolve their relation label maps one lookup after another

Open Beginner friendly
#8,354 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
performance

Research direction

Read loadLookups() in manage/list-page.js.template and list/page.js.template, then check how each lookup currently handles errors. The issue calls for independent lookups to run concurrently while preserving each lookup’s error handling. Done when labels appear after the slowest lookup rather than the sum of the round trips.

Written by the indexing model from the issue text.

Description

Issue

`loadLookups()` in the generated `manage/list-page.js.template` and `list/page.js.template` fetches the referenced rows of each relationship column one `await` at a time:

```js
const optCompany = await App.services.api.getAll('/.../CompanyController.java', { baseUrl: '' });
...
const optCurrency = await App.services.api.getAll('/.../CurrencyController.java', { baseUrl: '' });
```

The list itself does not wait for them (`loadLookups()` is not awaited), but every FK column shows its raw key until the LAST lookup of the chain has answered, so on a list with 8-10 relation columns the labels arrive after the sum of the round trips rather than the slowest one.

Found while fixing the same shape on the forms (#8344).

Expected

The lookups are independent and load concurrently (`Promise.all`, each keeping its own error handling), so the labels land after the slowest lookup, not after all of them in series.

Dominant language
Java
Stars
278
Forks
97
Avg merge
15h 33m
Merged PRs (30d)
301

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.