Improve performance of /api/events?withpublications=true

Description

The External API request /api/events support various query parameters to make the request include more data directly in the response to avoid further API calls needed to retrieve that data.

The query parameter withpublications will include full details about the publications (v.s. just the list of publication channel names) to avoid the need to call /api/events/{id}/publications/{id} for all events and publications.

Currently, the setting withpublications slows the request /api/events down by approx. factor 2 (depends on test scenario).

An analysis of the code revealed that while the request /api/events already retrieves all data of all events, setting withpublications=true will - for each event - issue another request to the search index.

Compatibility: Fully compatible with External API 1.0.0

Activity

Show:
James Perrin
October 12, 2017, 8:54 PM

Are you going to reinstate the branch for 3.x?

James Perrin
October 12, 2017, 9:00 PM

Also does the Admin UI make this call?

Sven Stauber
October 12, 2017, 10:12 PM

No, the code for r/4.x is slightly different and the change probably isn't of big relevance to the community at this point of time. The Admin UI does not use the External API /api/* at all but rather uses its own Admin UI facade endpoints.

Fixed and reviewed

Assignee

Sven Stauber

Reporter

Sven Stauber

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Major