[ 
https://issues.apache.org/jira/browse/SLING-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084452#comment-14084452
 ] 

Bertrand Delacretaz commented on SLING-3290:
--------------------------------------------

These comments might not be relevant at the current proof of concept level, 
feel free to keep them for later ;-)

IIUC you are using a Bloom filter to keep the number of queries down, until the 
vanityPath cache is ready?

Sounds like a good idea, but somewhat risky if for some reason the Bloom filter 
data becomes inconsistent - this is similar to content repository indexes in 
the end, that might need to be rebuilt if they get out of sync. Storing the 
filter data in the content repository would probably help, if it is updated 
atomically.

Also, updateBloomFilter() might become a bottleneck when importing lots of 
content that includes vanity paths, it probably needs to be asynchronous.

I'd much prefer reusing an existing Bloom filter implementation than building 
our own - it looks like Guava has one at 
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/hash/BloomFilter.html

> Long startup time with many vanityPath
> --------------------------------------
>
>                 Key: SLING-3290
>                 URL: https://issues.apache.org/jira/browse/SLING-3290
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>            Reporter: Antonio Sanso
>            Assignee: Antonio Sanso
>              Labels: vanity
>         Attachments: SLING-3290-patch.txt, StartupWithManyVanityPath.jpg
>
>
> When many vanityPath or alias are present the system take long time to 
> startup , Same when a vanityPath/alias is removed or updated .
> The reason behind is the usage of a query that updates the global mapentry.
> I have added a new Test to the performance test suite and this is the outcome
> {code}
> 0 vanityPath                  16ms
> 1  vanityPath                 19ms
> 10 vanityPath         70ms
> 100 vanityPath                111ms
> 1000 vanityPath               200ms
> 10000 vanityPath              1173ms
> 30000 vanityPath              3358ms
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to