Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xwiki-platform
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XWiki
xwiki-platform
Commits
b41e342a
Unverified
Commit
b41e342a
authored
2 years ago
by
Manuel Leduc
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
XWIKI-19875: TaskData.type values are duplicated in memory (#1868)
parent
036919eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/org/xwiki/doc/tasks/XWikiDocumentIndexingTask.java
+5
-1
5 additions, 1 deletion
...n/java/org/xwiki/doc/tasks/XWikiDocumentIndexingTask.java
with
5 additions
and
1 deletion
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/org/xwiki/doc/tasks/XWikiDocumentIndexingTask.java
+
5
−
1
View file @
b41e342a
...
...
@@ -129,7 +129,11 @@ public String getType()
@Unstable
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
// Replace duplicate strings with a canonical version. This is useful to lower the memory footprint when
// initializing tasks from sources where each type string is a new object (e.g., from the database), to avoid
// having a lot of String object with the same task type value (e.g., mention or links). We don't do the same
// for other field as they are either transient (e.g., instanceId), or more diverse (e.g., version).
this
.
type
=
type
.
intern
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment