Closed ke4 closed 2 weeks ago
It looks like that the root cause is that we are storing the same huge data in 2 different classes:
We create the ExperimentDesign
class with a huge structured data set first. That class is not very well designed. It can be split into more than one classes.
After create the ExperimentDesign
class we create the Experiment
class and copy some huge data structures from the to the Experiment
class. So we have them twice now in memory.
The fix has been implemented in this issue: Adding experiment design as a field to Experiment entity cause a memory issue
atlas-web-core: https://github.com/ebi-gene-expression-group/atlas-web-core/pull/123
Controller, service and DAO class for Experiment Design table:
atlas-web-single-cell: https://github.com/ebi-gene-expression-group/atlas-web-single-cell/pull/324
I collected all the relevant changes from the old PRs to implement the following new features:
We merged some PR to atlas-web-core and atlas-web-single-cell repositories related to Experiment Design refactor.
It looks like that these changes using even more memory as we can't start the web app with them on
staging
where we have lots of experiment. The web app gets memory issues when it tries to load a huge experiment and it stops there. The original goal of this change was to use less memory in the web app. With just a couple of experiments in the environment, like in our local environment it is working fine.We have to try to identify the root cause of this issue and create a fix for that and test it in
test
andstaging
environment.Steps:
I already created a new ticket to cover this issue: Adding experiment design as a field to Experiment entity cause a memory issue. I am going to reuse this existing ticket to reinvestigate the work Haider did and identify the part that is good for possible reuse/refactor for the next phase for experiment design refactor: putting experiment design into DB and read the data from there to display it in the web app.
Identify the reusable code in: