lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Henriksen (Jira)" <>
Subject [jira] [Created] (LUCENENET-640) Sequential IndexWriter performance in concurrent environments.
Date Mon, 13 Jan 2020 16:36:00 GMT
Mathias Henriksen created LUCENENET-640:

             Summary: Sequential IndexWriter performance in concurrent environments.
                 Key: LUCENENET-640
             Project: Lucene.Net
          Issue Type: Bug
          Components: Lucene.Net Core
    Affects Versions: Lucene.Net 4.8.0
            Reporter: Mathias Henriksen
             Fix For: Lucene.Net 4.8.0
         Attachments: AssertFinalBug.jpg, IdentityWeakReferenceBug.jpg, Program.cs, overviewBug.jpg

When creating Lucene.Net indices in parallel, sequential-like performance is experienced.
Profiling 8 concurrent IndexWriter instances writing in parallel shows that WeakIdentityMap::IdentityWeakReference::Equals
spends most time garbage collecting (94.91%) and TokenStream::AssertFinal (87.09% garbage
collecting) in my preliminary tests (see screenshots).

The [WeakIdentityMap|]
implementation uses an IdentityWeakReference as key, which is implemented as a class. By inspection
of this class, it is merely a System.Runtime.InteropServices.GCHandle wrapper as can be seen
in the mono project, manually wrapping of this struct in a struct rather than a class - will
eliminate some of the immense amounts of garbage collection.

This message was sent by Atlassian Jira

View raw message