Slow/Failure loading Application Entity pages

Known bugs reported by PacsOne users
Post Reply
Jonathan
Posts:184
Joined:Mon Mar 22, 2004 11:52 am
Location:The Netherlands
Contact:
Slow/Failure loading Application Entity pages

Post by Jonathan » Wed Jun 30, 2004 11:50 am

Due to the large amount of data the application entity page failes to load (completely) because of the calculation of directory sizes tyaking longer than the maximum php execution time.

I know I can edit the code and comment the dirsize calculation part out so it won't slow down or halt my code execution of the PacsONE server.

Another temporary solution is to change the directory where the data is stored, but this is also not a very nice option.

My question, point of improvement therefore is to try and find another faster way to calulate directory size. I know because of my own php coding experience that there's no build in function.

Maybe it is also an option to store the iamge sets in subdirectories instead of dumping all images in one directory. This will also make opening of directories faster.

Hopefully the problem can be solved.

Thanks in advance,

Jonathan

Jonathan
Posts:184
Joined:Mon Mar 22, 2004 11:52 am
Location:The Netherlands
Contact:

[Hint]: Slow/Failure loading Application Entity pages

Post by Jonathan » Wed Jun 30, 2004 2:54 pm

I have been browsing on the net for a possible solution... maybe if the system is ported to Linux this method can be used:

source: http://www.php.net/manual/en/function.d ... -space.php

Code: Select all

function Du($dir) 
{ 
       $du = popen("/usr/bin/du -sk $dir", "r"); 
       $res = fgets($du, 256); 
       pclose($du); 
       $res = explode(" ", $res); 
       return $res[0]; 
}


I think it is also possible to write something alike for the windows enviroment and use the same way to do it quiker than the PHP method on a windows box.

I think is is a suggestion worthwhile to consider implementing.

Jonathan

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Jul 01, 2004 1:15 am

There may be an easier solution here, since the original design to include directory usage information in the Application Entity page is to enable the user to view the disk usage/statistical information for the assigned archive directory for an AE.

The current method of calculating the EXACT file usage total for all files under the archive directory is not realistic when there're a large number (50,000+) files to add up the total file size, no matter how we optimize this task, it'll still require significant amount of CPU power to be able to calculate the total file size for such a large number of files within a short amount of time.

The proposed solution is to use the disk usage information instead of the directory file usage total. The disk usage information will still give the user the disk utilization percentage information, but it takes a constant CPU time to obtain the disk usage information since it's stored per disk.

If you all agree with this proposal, I'll go ahead and modify the corresponding PHP script(s) and release a new PHP revision.

Thanks very much for finding and reporting this issue.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Mon Jul 05, 2004 2:32 am

I've updated the php.zip package for the PacsOne Server Basic Edition from the PacsOne download site, which implements the disk usage changes described above.

For users of PacsOne Server Premium Edition, until the next version is released, please use the following URL to download the PHP update which implements the same disk usage changes:

http://www.pacsone.net/display.php.zip

Jonathan
Posts:184
Joined:Mon Mar 22, 2004 11:52 am
Location:The Netherlands
Contact:

[Error] Bug in display.php update?

Post by Jonathan » Mon Jul 05, 2004 1:11 pm

Yhank you very much for the quick change and implementation of my suggestion.

I 've overwritten the display.php file with the new one after making a backup... but now the whole interface is corrupt. The display of the main page shows only the following text after the menu bar:

There are 2334 patients in PACS database.

Previous Next Displaying 1-1 of 1 patients:

So it is able to count the total number of patiënts in the database, but is not able to display the list with the links to all patients. Did I do something wronmg or is there a new bug in the update?

Have replaced the new one with the backup and now everything seems to work fine again. So the problem is in the updated display.php I guess, probably somewhere in the DisplayPatients function.

Kind regards!

Jonathan

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Mon Jul 05, 2004 4:35 pm

The updated version of "DISPLAY.PHP" posted on the PacsOne download site is based on the latest release 1.1.5, which might not be the same version you're using.

If that's the case, you can send your version of the file "DISPLAY.PHP" to the following and I'll make the same fixes for you:

mailto:pacsone@pacsone.net

Jonathan
Posts:184
Joined:Mon Mar 22, 2004 11:52 am
Location:The Netherlands
Contact:

Post subject: Slow/Failure loading Application Entity pages

Post by Jonathan » Tue Jul 06, 2004 7:39 am

Thanks for the support, don't bother figured it out myself, implemented the code in our PacsONE Basic Edition v 1.0.0.14. Have enough PHP coding experience to do so. Have been looking for a du equivalent for the windows environment, haven't found anything yet. Should not be hard to write it myself, I'll let you know if I manage to do so.

BTW is the only updated release the Premium edition? If so than maybe we should consider switching to premium edition.

Is there already some sight on a PacsONE linux/unic edition?

Anyhow thanks very much!

Jonathan

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Tue Jul 06, 2004 11:50 am

Yes, PacsOne Server Premium Edition is updated regularly with additional features as well as bug fixes. The development for the Basic Edition has been idle for quite a while, and there will not be any updates unless someone find a critical bug which needs immediate attention.

I'll post a poll about development for the Linux version after the next version (version 1.1.6) for PacsOne Server Premium Edition is released.

Post Reply