Bug 543342 - Memory wastage in ValidationService
Summary: Memory wastage in ValidationService
Status: CLOSED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: Validation (show other bugs)
Version: 1.19.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.20.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2019-01-10 09:16 EST by Nicole Behlen CLA
Modified: 2019-02-19 09:34 EST (History)
1 user (show)

See Also:


Attachments
Example Application (187.15 KB, application/zip)
2019-01-10 09:16 EST, Nicole Behlen CLA
no flags Details
JProfiler snapshot processing 10000 EObjects (535.93 KB, application/octet-stream)
2019-01-10 09:18 EST, Nicole Behlen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole Behlen CLA 2019-01-10 09:16:16 EST
Created attachment 277127 [details]
Example Application

I noticed that the ValidationService allocates exponentially java.util.concurrent.ConcurrentLinkedQueue$Node	objects.

With the attached example application tested with several number of EObjects by changing the following constant:
 
org.eclipse.emf.ecp.makeithappen.application.sample.e3.View

	private static final int NUMBER_OF_USERS = 10;

Result:

The number of allocated java.util.concurrent.ConcurrentLinkedQueue$Node is increasing exponentially:

NUMBER_OF_USERS  | EObjects added to ValidationServiceImpl#validationQueue
---------------------------------------------------------------------------
10               | 77
100              | 5252
1000             | 502502
10000            | 50025002

In case of having 10.000 Users, during the rendering the ConcurrentLinkedQueue is occupying about 1.200 MB in RAM (regarding JProfiler)
Comment 1 Nicole Behlen CLA 2019-01-10 09:18:23 EST
Created attachment 277128 [details]
JProfiler snapshot processing 10000 EObjects
Comment 2 Eugen Neufeld CLA 2019-01-11 09:48:06 EST
Hi, thank you for the detailed analysis.

We would happily take any help on fixing this issue.
Comment 3 Eclipse Genie CLA 2019-01-12 07:36:07 EST
New Gerrit change created: https://git.eclipse.org/r/134994