This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-16154826-71df-4595-bf46-5460b46f430d XWIKI-24276 Open

The automatic use of documents in the async context can use a lot of memory

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-ffc712b6-3fa3-4067-823d-49c9c027529e Thomas Mortagne created this issue on 22/Apr/26 17:53
 
Summary: The automatic use of documents in the async context can use a lot of memory
Issue Type: cid:jira-generated-image-avatar-16154826-71df-4595-bf46-5460b46f430d Bug
Affects Versions: 10.10-rc-1
Assignee: Unassigned
Components: Rendering - Async
Created: 22/Apr/26 17:53
Priority: cid:jira-generated-image-static-major-0a39bd61-a4d3-4767-a3d0-b472fc94ad15 Major
Reporter: Thomas Mortagne
Description:

A use case which is typically going to use a lot of memory is an asynchronous execution which manipulate a huge number of documents: while manipulating a document one by one should not be a problem for the memory usually, in the case of an async execution each manipulated document will adds an entry in the AsyncContext (XWiki#getDocument registers each document through AsyncContext#useEntity).

This automatic use has a lot of value for more common content in which a modification of one of the manipulated documents will automatically cause the result to be invalidated, but this specific use (contrary to the use of web resources, for example) is pretty useless when caching is not enabled.

Some ideas to improve that:

  • have a maximum number of entries added to the async context
  • disable the auto use when caching is disabled, depending on the type of use
  • introduce an API to let a script explicitly disable use (maybe by type)
 
 

2 updates

 
cid:jira-generated-image-avatar-ffc712b6-3fa3-4067-823d-49c9c027529e Changes by Thomas Mortagne on 22/Apr/26 17:53
 
Description: A use case which is typically going to use a lot of memory is an asynchronous execution which manipulate a huge number of documents: while manipulating a document one by one should not be a problem for the memory usually, in the case of an async execution each manipulated document will adds an entry in the AsyncContext (XWiki#getDocument registers each document through AsyncContext#useEntity).

This automatic use has a lot of value for more common content in which
a the modification of one of the manipulated documents will automatically cause the cached result to be invalidated, but for example. But this specific use (contrary to the use of web resources, for example) is generally pretty useless when caching is not enabled (except for a use case which would use the async context to identify all documents loaded in some content) .

Some ideas to improve that:
* have a maximum number of entries added to the async context
(should probably be done anyway, as the context become quite unusable if are is too many entries)
* disable the auto use when caching is disabled, depending on the type of use
* introduce an API to
let a script explicitly disable use (maybe by control if some type ) of automatic use is enabled
Labels: performance