In some OS, the ram is not only "RAM". The virtual ram uses the disk. That's
very slow.
In some windows platform, you will find half of some application's ram is
virtual ram.
That's some why windows is slow in some fields.

On 6/11/06, Flik Shen <[EMAIL PROTECTED]> wrote:

 Hi,



I am freshman to Lucene and I am reading the book "Lucene In Action".

Just as that we know, there are two kinds of directory to hold index, one
is File System and the other is RAM.

There is a sample to compare performances of these two kind directories
and there is also a piece of code about "Batch indexing by using
RAMDirectory as a buffer".

When I follow some samples, I found an interesting thing about indexing
performance.



I combine these two pieces of codes and time each kind directory indexing.
(Please refer the attachment for details processes)

I load 3000 docs and 5 words per doc. I use File System Directory and RAM
Directory to indexing these docs directly. The time of these two are 10737ms
and 1575ms.

Then I use a RAM directory as a buffer for indexing and use method
"addIndexes" of a new Index writer which finally holds index in a File
System directory.

The time it consumed is 1348ms.

How could this be?

I think the time that buffered indexing consumes should base on the time
of RAM indexing.

I wonder why a buffered indexing even has a good performance than a ram
indexing.

So interesting!



Best regards,

Flik Shen
 **************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this e-mail
or its contents to any other person and any such actions are unlawful. This
e-mail may contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as a
result of any virus in this e-mail. You should carry out your own virus
checks before opening the e-mail or attachment. Infosys reserves the right
to monitor and review the content of all messages sent to or from this
e-mail address. Messages sent to or from this e-mail address may be stored
on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

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




--
--
Yueyu Lin

Reply via email to