Exporting structure is very slow

User 73ad691ca3

16-04-2013 05:39:53

Dear Chemaxon Team,


We are trying to export the structure data from the database(based on select query) to the .sd file using the Jchem .Net API(Exporter class),  But the Jchem Exporting is very slow.


When we run the select query from the sql developer, it takes .07 seconds; But when we do the export using Jchem .Net Api(Exporter class), for the same select query it takes more than 3 seconds.  we are trying to export  only 10 records.


Is this the way the Jchem exporter works, or can we improvise the performance?


Is there any option in Jchem, so that we can export the structure data from the database very fast?


Please find below the sample code we use for the export:


///////////////////////////////sample exporter using jchem .net api///////////////////////////////////////////////////////////////


               #region Jchem Export API


                OutputStream outs = null;
                int exportFormat = Transfer.__Fields.SDFILE;//2


                try
                {
                    Exporter exp = new Exporter();
                    exp.setConnectionHandler(conh);
                    exp.setSelectStatement(qry);


                    java.io.File file = new java.io.File(exportFileName);
                    file.getParentFile().mkdirs();
                    outs = new java.io.FileOutputStream(file);


                    exp.setTableName(structureTableName);
                    exp.setOutputStream(outs);
                    exp.setFormat(exportFormat);


                    exp.writeAll();//we also tried to export one by one
                }
                catch
                {
                    throw;
                }
                finally
                {
                    outs.flush();
                    outs.close();
                }


                #endregion


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Thanks & Regards,


D. Senthil kumar vijai.


 


 

ChemAxon eb65a25631

16-04-2013 12:52:20

Hi,


it takes some time to initialize/load the assemblies on start.


But after it, any calls following should work just as fast as it should.


 


Regards,


Andras