so-90prime / 90prime

General repo for everything related to 90Prime (docs, diagrams, thoughts)
2 stars 0 forks source link

90Prime gui displays some sluggishness #46

Closed dsand closed 1 year ago

dsand commented 2 years ago

The new 90Prime gui is great, but we do notice that it takes a while to refresh if you have been away from the browser tab for even a short while. It sometimes requires a reload.

@pndaly has volunteered to look into this a bit.

davner commented 2 years ago

I believe I have a lead.

When log messages come in, I created a p element and populate it with the message. Then I append it to the log window. This log window has its height calculated and scrolled to the bottom so that it keeps the newest message at the bottom and the older messages shifted upwards.

I didn't have a limit of messages stored in the log window. After time, this could have thousands of messages. I'm sure the overhead in this process is contributing to the sluggishness, if not all of it.

I now have a function that is called on new messages that checks if the log window has over X amount of logs appended. If so, it removes the oldest logs.

I will pop into the meeting this Friday to discuss it more. I will have the changes pushed to the MMTO repo.

pndaly commented 2 years ago

Met with CJ, Scott and Dan after the s/w meeting this morning. The idea of separating out the pyindi infrastructure code and clients was discussed and will be followed up.

dsand commented 2 years ago

@davner has a solution for this which will be tested out on the April 19, 20, 21 engineering run.

dsand commented 2 years ago

@davner has implemented a fix to the sluggish gui. we will try it out during the run and report back here.

dsand commented 2 years ago

The gui performed well. No more sluggishness! I think we will keep an eye on this through the next run before closing this issue.

dsand commented 1 year ago

I think I'm going to close this -- have not noticed sluggishness for a while. @pndaly should reopen if he thinks otherwise.