NW: Performance optimization
The goal of this MR is to refactor the News component to optimize the dashboard loading times reported in Mantis https://mantis.ilias.de/view.php?id=46452. Multiple analyses have shown that long dashboard load times are caused by inefficient processes and code sections in the News component. This refactoring aims to optimize three key areas:
Database
- Table
il_news_item: Introduce a composite index on (context_obj_id,context_obj_type,creation_date) - Implement validation through plain SQL logic using EXISTS
- Use optimized SQL queries with prepared statements
Implementation of a Two-Tier Caching Model
- Global Cache: The raw news data (without user-specific information) should be stored in a global cache accessible to all users. The object’s RefID can be used as the key.
- User-Specific Cache: Only user-specific data, particularly the individual news feed, is stored in this cache. When displaying messages, this data is enriched with that from the global cache.
Architecture
- Introduction of a Repository Layer: All database query logic will be moved from
ilNewsIteminto a new class, e.g.,ilNewsRepository.ilNewsItemwill become a pure Data Transfer Object. - Separation of Business Logic: The logic for aggregating and preparing data will be moved from
ilNewsForContextBlockGUIinto a dedicated service class. This allows for targeted loading (eager loading) and caching of dependencies (tree) and object information. - Avoidance of Redundancy through reference-based operations — similar to object pooling or linking logic in the magazine.
This change set has been tested on a large customer installation that initially reported the issue. The loading time of the News component has been reduced to a minimum. Two different approaches were used for testing:
- Manual comparison between current ILAS 9 and patched ILIAS 9 by enabling/disabling different components on the dashboard.
- Performance evaluation platform using synthetic data approximating the size of the customer’s dataset. With the patch applied, rendering the News component on the dashboard takes around ~500ms.
If requested, we can also provide more detailed information about the new implementation structure and performance analysis results.
The PR has mainly be developed by @lukas-heinrich.
We would love to bring this changes into the release_9 as it has been developed and tested for this Version. We are looking forward to feedback.
Best Regards, @thojou
We would like to discuss this PR at the next JourFixe on 08 Dec 2025. The reason is that we intend to include these changes in release_9. Therefore, if the JourFixe approves this PR, we plan to proceed with the merge in the following days.
Jour Fixe, 08 DEC 2025: Bug fix has been accepted by Jour Fixe. Related PR can be merged to release_9 and higher. Thank you very much for this improvement of performance.
Hey @lukas-heinrich,
thanks for the PR and the improvements. I've integrated the changes into release_9, release_10, release_11 and trunk.
Best Regards, @thojou