Wolfram Horwath wrote:
Vadim Gritsenko schrieb:
Wolfram Horwath wrote:
In DB I have 100 documents, each about 2,6K of size. I found that the conversion was rather slow and tried to improve performance. I was reducing open/close of a Collection, and reducing database-queries by caching often needed results. As it was still slow, I thought it would be writing files to disk.
I then remembered the hint of someone to have a look at eXist and, both using XML:DB, switched database for testing purposes. What I found was neat was the way I could access the results of a query with eXist, but then came the drawback: while the conversion using Xindice took about 140s, eXist needed about 20s, which I find puzzling, as the documents are really small in size.
This are just my observations, any comments?
Unit tests in Xindice inserting 10000 documents, and then reading them all in just several seconds, which is fast enough for me.
So, what could be the problem responsible for it being so slow in my task?
I don't know - I don't have your task, and I don't have your environment.
Can you take a look at the org.apache.xindice.integration.client.basic.DocumentTest, org.apache.xindice.core.filer.FilerTestBase.testInsertManyDocuments(), and come up with some test (you can add it to DocumentTest or XMLResourceTest) which would be similar to your task (and as slow as your task)?
You can then run your test, and see how it works for you. Simply follow these steps:
* build
* xindice start
* build test
Read html reports in build/test-report.
Once there is a test, it is possible to determine a problem why it is so slow for you.
PS Wild guess: do you have DTD declarations in your XML pointing to a DTD located on an external server, and for each XML parsing, parser goes over the network for the DTD? You can easily detect this by unplugging from the network.
Vadim
