Hi Slide-devs,

I installed a current CVS-version of Slide and connected it with WebDAV
using Windows-Webfolders.

Performance for a PROPFIND (hit F5) on a folder containing about 20 
files and folders was not really thrilling but ok.
Then I changed the database from the internal HSQL to MySQL, running on
a different machine in our network. Now PROPFIND was very very
timeconsuming:

08 Jul 2002 16:03:43 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPF
IND = 207 Multi-Status (time: 212856 ms) URI = /files/cebit2002

That's more than 3 minutes for a PROPFIND on a folder, containing about
20
other folders and files !

Profiling Slide suggested, that all time was spend on networked 
database-calls, almost all of them originating from two functions:

slidestore.reference.JDBCContentStore.isConnected()     and
slidestore.reference.JDBCDescriptorsStore.isConnected()

Each call to isConnected(), and there seem to be quite a few, results
in four networked database operations:
- connection.isClosed()
- connection.prepareStatement(...)
- statement.executeQuery()
- statement.close()

If I comment out those statements (patch attached), performance
increases
400000% to:

08 Jul 2002 16:24:36 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPF
IND = 207 Multi-Status (time: 541 ms) URI = /files/cebit2002

Is isConnected() really neccessary ? If there is something wrong with
the
database connection, isn't Slide going to find out soon enough ?

Thanks,
Raimo.
-- 
Dipl.-Inform. Raimo Ihle               Tel: +49 (0)30 39 40 54 25
bit~side GmbH                          Fax: +49 (0)30 39 40 54 50
Salzufer 14a Aufgang D                 Email: [EMAIL PROTECTED]
10587 Berlin                           WWW: <http://www.bit-side.com>
Index: JDBCContentStore.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-slide/src/stores/slidestore/reference/JDBCContentStore.java,v
retrieving revision 1.18
diff -r1.18 JDBCContentStore.java
362,363c362,364
<          try {
<              if ((connection == null) || (connection.isClosed())) {
---
> //         try {
> //             if ((connection == null) || (connection.isClosed())) {
>            if ((connection == null)) {
366,371c367,372
<              
<              PreparedStatement statement = 
<                  connection.prepareStatement(getDatabaseConnectionTestStatement());
<              statement.executeQuery();
<              statement.close();
<              
---
> 
> //             PreparedStatement statement =
> //                 connection.prepareStatement(getDatabaseConnectionTestStatement());
> //             statement.executeQuery();
> //             statement.close();
> 
375,377c376,378
<          } catch (SQLException e) {
<              throw new ServiceAccessException(this, e);
<          }
---
> //         } catch (SQLException e) {
> //             throw new ServiceAccessException(this, e);
> //         }
Index: JDBCDescriptorsStore.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-slide/src/stores/slidestore/reference/JDBCDescriptorsStore.java,v
retrieving revision 1.32
diff -r1.32 JDBCDescriptorsStore.java
503,504c503,504
<         try {
<             if ((connection == null) || (connection.isClosed())) {
---
>  //       try {
>             if ((connection == null)) {
508,511c508,511
<             PreparedStatement statement = 
<                 connection.prepareStatement(getDatabaseConnectionTestStatement());
<             statement.executeQuery();
<             statement.close();
---
> //            PreparedStatement statement =
> //                connection.prepareStatement(getDatabaseConnectionTestStatement());
> //            statement.executeQuery();
> //            statement.close();
516,518c516,518
<         } catch (SQLException e) {
<             throw new ServiceAccessException(this, e);
<         }
---
> //        } catch (SQLException e) {
> //            throw new ServiceAccessException(this, e);
> //        }

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to