OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.35k stars 3.36k forks source link

browser slows down when database contains a lot of images #249

Closed akosijoy closed 5 years ago

akosijoy commented 6 years ago

Hello,

I currently have two deployments that use the viewer, one has 17000+ images and another has 24000+, and they both run considerably slower compared to when the database didn't have as much. Is it possible to make a simple edit in the code that will disable the initial querying of the entire database so that users will be required to use the search/filter option before anything reaches the front end?

Thank you

swederik commented 6 years ago

What kind of PACS are you using? What default date filter are you using?

akosijoy commented 6 years ago

Hello, thanks for the reply. The PACS i'm using is DCM4CHEE. And what are you referring to with default date filter? I didn't really edit the code apart from adding a login/accounts option. This current deployment though is not the latest version available here. I'm not sure exactly how old/what version it is though if that information is needed.

swederik commented 6 years ago

We have a default number of days setting here:

https://github.com/OHIF/Viewers/blob/ebe0a40f3ef5fa7d13c66e7076ddeb1f42e755b5/Packages/ohif-study-list/client/components/studylist/studylistResult/studylistResult.js#L256

https://github.com/OHIF/Viewers/blob/33755f7b8b92e33dd45974315fb6c7fe779df8f8/Packages/ohif-servers/both/schema/servers.js#L184-L188

https://github.com/OHIF/Viewers/blob/830146441dff80a76c13a51c94ddc644d5348e8f/config/ClearCanvasDIMSE.json#L32-L37

If this is set at 1, you should hopefully only be loading the most recent studies when you first load the study list. Could you check if that helps?

akosijoy commented 6 years ago

ok i'll try it out and i'll let you know how it goes. thank you

akosijoy commented 6 years ago

hello, I tried it and it worked on the newer version of the code that i'm currently working on. I added the "studyListDateFilterNumDays": 1 code on the DIMSE file and it filtered out the initial query.

However, the one currently deployed is running an older version and it doesn't work on it. I tried adding the variable on the DIMSE file, but it didn't change anything. The Packages folder doesn't contain "ohif-servers" nor "ohif-study-list" folders inside. As mentioned this is an older version of the code.

I'm going to eventually upgrade the system to use the newer version, but until then is there another option that could help with this problem?

swederik commented 6 years ago

It was probably called ohif-studies before. We are trying to consolidate / clean up the packages a bit.

You can try to look for the studylistResult.js file and then edit the start date and end dates manually:

https://github.com/OHIF/Viewers/blob/ebe0a40f3ef5fa7d13c66e7076ddeb1f42e755b5/Packages/ohif-study-list/client/components/studylist/studylistResult/studylistResult.js#L257-L262

akosijoy commented 6 years ago

hello,

There is no package called ohif-studies nor a variable called dateFilterNumDays. Included in the Packages folder are

active-entry cornerstone design dicomweb dimseservice hangingprotocols hipaa-audit-log lesiontracker meteor-stale-session ohif-core orthanc-remote validatejs viewerbase wadoproxy worklist

swederik commented 6 years ago

Yeah I know, just look for something like 'startDate'. You can check the worklist package. If you know the exact commit, it's easier to look around.

akosijoy commented 6 years ago

Unfortunately I couldn't find out which commit it is. I'll just push through with the newer deployment as fast as I can. Thank you for taking the time to help me.