constellation icon indicating copy to clipboard operation
constellation copied to clipboard

Analytic view lag

Open formalhaut69 opened this issue 4 years ago • 16 comments

Prerequisites

  • [ ] Put an X between the brackets on this line if you have done all of the following:
    • Running the latest version of Constellation
    • Attached the Support Package via Help > Support Package
    • Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ
    • Checked that your issue isn't already filed: https://github.com/constellation-app/constellation/issues
    • Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories

Description

The analytic view can lag after several different plugins are used.

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behaviour: [What you expect to happen]

Actual behaviour: [What actually happens]

Reproduces how often: [What percentage of the time does it reproduce?]

Additional Information

analyticViewLag

formalhaut69 avatar Jul 15 '20 03:07 formalhaut69

Tested this issue in V1 and it also occurs there, I'll remove the RC1 tag. To reproduce this issue, I selected each analytic from each category and then ran them several times.

formalhaut69 avatar Jul 16 '20 00:07 formalhaut69

You can only run analytics from a single category for any single 'run'. When you do, each analytic will be run in it's own thread and the results will be combined when they are all finished executing. If you choose to run more analytics while there analytics are executing, that will work fine, but the old lot won't be cancelled. This means that you could end up running hundreds of rather complex calculations each in their own thread - which would likely cause the lag, particularly if they are all competing for read/write locks on the one graph.

cygnus-x-1 avatar Aug 03 '20 05:08 cygnus-x-1

@cygnus-x-1 Do you feel this is a problem that needs addressing? Or something that is kind of unavoidable with this kind of use?

Nova-2119 avatar Aug 27 '20 04:08 Nova-2119

@Nova-2119 I never actually added this into the ticket but for context, I discovered the lag through general use so that's why I thought it might require a ticket.

formalhaut69 avatar Aug 27 '20 04:08 formalhaut69

@cygnus-x-1 Do you feel this is a problem that needs addressing? Or something that is kind of unavoidable with this kind of use?

I'd like to investigate this as it could be a memory leak or other performance issues at play.

arcturus2 avatar Aug 27 '20 07:08 arcturus2

@Nova-2119 I never actually added this into the ticket but for context, I discovered the lag through general use so that's why I thought it might require a ticket.

Thanks for adding this context :)

@arcturus2 I'll see what I can find!

Nova-2119 avatar Aug 31 '20 06:08 Nova-2119

You can only run analytics from a single category for any single 'run'. When you do, each analytic will be run in it's own thread and the results will be combined when they are all finished executing. If you choose to run more analytics while there analytics are executing, that will work fine, but the old lot won't be cancelled. This means that you could end up running hundreds of rather complex calculations each in their own thread - which would likely cause the lag, particularly if they are all competing for read/write locks on the one graph.

So could a potential way to fix these be to somehow implement a mechanism that holds off starting threads for a second batch until the first batch is finished?

Nova-2119 avatar Aug 31 '20 06:08 Nova-2119

You can only run analytics from a single category for any single 'run'. When you do, each analytic will be run in it's own thread and the results will be combined when they are all finished executing. If you choose to run more analytics while there analytics are executing, that will work fine, but the old lot won't be cancelled. This means that you could end up running hundreds of rather complex calculations each in their own thread - which would likely cause the lag, particularly if they are all competing for read/write locks on the one graph.

So could a potential way to fix these be to somehow implement a mechanism that holds off starting threads for a second batch until the first batch is finished?

Scratch that, the Run button turns into a stop button once a batch of analytics are running, so I think you can only have one batch running at a time.

@formalhaut69 How bad is the lag? I'm unsure whether or not I am able to recreate this issue. I'm getting a slight lag when I switch between analytics, at the very most a second, probably more like half a second, is that the lag you are describing?

Nova-2119 avatar Sep 01 '20 22:09 Nova-2119

@Nova-2119 I think it is the lag @formalhaut69 referred to. I'm thinking the lag is really just too much occurring on FX threads. If you click one of the drop downs or check-boxes, it takes a second or more to really have a change be displayed. I noticed it getting worse the more you use the view. If you load up the thread by clicking them all a few times fast it seems to get worse.

I think the issue @cygnus-x-1 was mentioning was how the Analytic View actually runs the analytics as opposed to them loading their preferences within the UI. I've experienced this issue before without having to run an analytic. So I think it's more or less related to clicking things like plugins, questions, categories and check boxes.

aldebaran30701 avatar Sep 04 '20 06:09 aldebaran30701

I have observed this behaviour with v2.3 however I noticed it has to be a graph with a large amount of nodes (I had 50) and I had to quickly click on the different categories and run them. Constellation ended up freezing. No issues with a small number of nodes or waiting for each plugin to finish loading.

GammaVel avatar Jun 25 '21 06:06 GammaVel

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Dec 23 '21 01:12 github-actions[bot]

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Sep 14 '22 00:09 github-actions[bot]

Lag is present in v2.8 however you need to have a larger graph to be able to really notice it. The analytics start to take longer to run and in some case., do not complete within a reasonable time. A small graph is ok.

GammaVel avatar Oct 19 '22 05:10 GammaVel

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Apr 21 '23 00:04 github-actions[bot]

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Nov 15 '23 00:11 github-actions[bot]

I have taken a look of this in version 2.11 with the latest nightly build (9/02) and the lag is still present. It doesn't show up at the start but as I started to click through the categories and the questions it got more noticeable. This is without actually running the analytics. Looks like there is still some issue there, number of nodes was 1500.

GammaVel avatar Feb 09 '24 00:02 GammaVel