ActiveBrainAtlas2 / activebrainatlasadmin

This is the ActiveBrainAtlas database portal. This project provides the admin area to edit data associated with the Active Brain Atlas project. It also provides the REST API.
0 stars 1 forks source link

Clicking "Save Annotations" does not always work #155

Closed mm6654 closed 10 months ago

mm6654 commented 1 year ago

Clicking the "Save Annotations" button requires a waiting time of about 1 minute before a message appears on the screen (on the production server).

Sometimes the annotations are successfully saved, but many times the message "Internal error: see debug message" will appear instead.

In both instances, it takes a while for the button to do something. The "Save" button is perfectly fine and saves almost immediately.

eddyod commented 1 year ago

I'm going to try to simplify this process as it is overly complicated. Duane mentioned before that maybe this data should just be saved as JSON and remove the 'Save annotations' buttons on each annotation layer. We could just use the 'Save' button which has always worked well and then parse the polygons, marked cells and coms out later when we need them. I'll fix the existing process though it will probably take a day or three.

eddyod commented 1 year ago

I improved the process and put it on https://activebrainatlas.ucsd.edu It is not on webdev as the database portal is not working on webdev. Please note, the popup saying 'The annotations have been sent to the database' still takes up to 20 seconds to appear for the polygons. The polygons have a LOT of data in them and it takes a while to parse all the JSON data. If this proves to continue to be an issue, we should consider an alternative to the 'Save annotations' button.

eddyod commented 1 year ago

I figured out why the 'Annotations have been sent to the database' response was slow. Whenever a user clicks any 'Save annotations' button, the entire JSON state also gets saved. The entire JSON state must be updated/saved for the 'Save annotations' button to parse any data that is changed. The entire process is working but the response saying 'Annotations have been sent to the server' takes anywhere from 2 to 60 seconds.

eddyod commented 1 year ago

I have created a fix. When the user clicks the 'Save annotations' button, a message should immediately be displayed telling the user that the annotations are being sent to the server. This message will appear for a few seconds as normal. The entire job is then sent to a background process where it gets entered into a queue. If there is an error, an error message will appear and will stay visible until the user closes the message.

drinehart1 commented 10 months ago

Is current brainsharer Neuroglancer version includes this fix, and it works, please close