Jchem Performance improvement ?

User b5f79361ac

14-10-2008 16:00:45

Hi,


I developed a web application (embedded in JChem) to query compound info from back-end Oracle database. Since there are thousands of compounds totally, I set 20 compound records per page. But the performance is not good enough. I often need to wait more than 1 min to show next page. And sometimes it is stuck, and I need shut web browser, and restart it.


Anybody can help me?


Thanks a lot!


Yinghua

User b5f79361ac

14-10-2008 16:41:09

I also followed the "Substructure search performance tuning" (http://www.chemaxon.com/forum/ftopic1357.html) on the Forum to set structure Caching as follow:


JChemSearch.setStructureCaching(true)





But I find there is no this method in Jchem 5.0.5, which I used.

ChemAxon e274e1bada

14-10-2008 17:53:27

Hi yinghua,





the paging may depend on lot of things, e.g. how do you represent the results? If you use Marvin View, check the Marvin's stack trace in the browser's Java console. Please post me the version of this, your operating system type and version and your browser type and version if any error appears there.


Maybe you should try to change the Marvin with a newer version in your JChem root. You can find the newest cross platform package of Marvin here: http://www.chemaxon.com/marvin/download-dev.html


Were you experience this under both of different browsers?





You can check the JChem's search time with getSearchTime() in JChemSearch. See the API: http://www.chemaxon.com/jchem/doc/api/chemaxon/jchem/db/JChemSearch.html#getSearchTime()


Let me know if this value is too high.


In addition you can get some other information with this function: setInfoToStdError


API: http://www.chemaxon.com/jchem/doc/api/chemaxon/jchem/db/JChemSearch.html#setInfoToStdError(boolean)





For your second post: we don't support the non caching mode any more, this method was removed form API in JChem 5.1. We will change the documentation, thank you for this perception.





Regards, Edvard

User b5f79361ac

14-10-2008 20:51:13

Hi Edvard,





Thanks for your reply!





My Marvin version is 5.0.5.


I tried several ways, which are using my desktop (Windows XP Professional, dual CPU @ 2.4GHz, 3.25GB of RAM) as server, and using our Linux server (Red Hat Enterprise Linux AS release 3).


Web browser is Firefox 3.0.3. While I also tried IE 7, it doesn't show the right way (no matter how many compounds in result, it always only reports one structure). But I think that is the other issue.





The performance of two servers are similar.


Usually search time is 500 - 600ms. I think it is OK. But the marvin applets always show "loading", or when I go to next page (20 compounds per page) it is stuck.





So do you think the bottleneck is from client end?


If so, for getting good performance, what is the requirement for client PCs?





Thanks again!


Yinghua

ChemAxon e274e1bada

14-10-2008 22:29:21

yinghua,





please check the java console in your browser and try to upgrade Marvin to the newest version. You have to change the whole Marvin directory in you JChem's root.





Regards, Edvard

User b5f79361ac

15-10-2008 16:30:35

I updated Marvin in Jchem's root.


And Java console shows as follow:





Cookie service is not available - use cache to determine "Cookie"


Cookie service is not available - use cache to determine "Cookie"


Cookie service is not available - use cache to determine "Cookie"


Cookie service is not available - use cache to determine "Cookie"


Cookie service is not available - use cache to determine "Cookie"


Cookie service is not available - use cache to determine "Cookie"





Is it significant for performance? How can I use cache to determine "Cookie"?





The results of Marvin applets show faster than before. But when going to next page (20 compounds per page), I need to wait more than 60 seconds.





Thanks!

ChemAxon e274e1bada

17-10-2008 12:43:53

This console message has no effect to the performance of Marvin.


It seems the error may be in your JSP code. Please review our JSP example, you can find it in the JChem package. (examples/db_search). Tha paging part is in the searchresults.jsp





Regards, Edvard

User b5f79361ac

22-10-2008 17:09:18

I cannot see any error in jsp code. The only way I can change is showing 10 or 15 compound records per page, instead of 20. Then it runs much faster than before.





Thanks for the help!

ChemAxon 9c0afc9aaf

28-10-2008 23:52:47

Hi,





You can easily test if this is a back-end or front-end issue by temporarily commenting out the code for the applets for example.


I guess your paging will be fast that way (means it is about the applets).





The problem might be that you are trying to display too many applets on one page.





This may require a lot of resources, and the allowed memory consumption is also limited for the applets in the browser.





I suggest to display structures as a cells of a single MarvinView Table instead.





Please look at our examples on how to manage these tables:


http://www.chemaxon.com/marvin/examples/applets/view/index.html





Best regards,





Szilard

ChemAxon 7c2d26e5cf

29-10-2008 11:25:16

Alternatively, you can use images instead of applets to display query results.


In this case, you need only one applet if you would like to edit structure.


Behind each image, the molecule source is stored. By selecting an image, the linking molecule source is sent to the applet to visualize it. By changing of the applet, a request is sent to the server to regenerate the image of the molecule.


Please see the following examples.


http://www.chemaxon.com/test/image-generation/show_image5.jsp


http://www.chemaxon.com/test/image-generation/show-image-ajax2.jsp