MoveFast
MoveFast

Reputation: 3025

Infinispan - Very slow for loading data with indexing. Can it be made faster?

Configuration infinispanConfiguration = new ConfigurationBuilder()
      .indexing()
         .enable()
         .indexLocalOnly(true)
      .build();

DefaultCacheManager cacheManager = new DefaultCacheManager(infinispanConfiguration)

;

    @Indexed @ProvidedId
    public class Book {
       @Field String title;
       @Field String description;
       @Field String author;
       @Field int yearOfPublication ;
       String briefDescription;
       int edition;
       boolean isBestSeller;
    }

Upvotes: 3

Views: 2967

Answers (2)

rjdkolb
rjdkolb

Reputation: 11888

I had the same issue.

The insert of 25000 Books (from Infinispan user guide) took 361 seconds

ConfigurationBuilder config = new ConfigurationBuilder();
config.indexing().index(Index.LOCAL);

The insert of 25000 Books took 1.6 seconds

ConfigurationBuilder config = new ConfigurationBuilder().indexing().setProperty("default.directory_provider", "ram").setProperty("default.indexmanager", "near-real-time");
config.indexing().index(Index.LOCAL);

Upvotes: 1

uaarkoti
uaarkoti

Reputation: 3657

As you know Infinispan uses Hibernate Search & Apache Lucene when you are using indexing module.

Based on your configuration you are using the default values for Lucene indexing. There are lots of options you can specify to improve indexing performance.

You can refer to the following for more information

[1] https://docs.jboss.org/author/display/ISPN/Querying+Infinispan [2] http://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#lucene-indexing-performance

Upvotes: 2

Related Questions