BloomFilter.NetCore
BloomFilter.NetCore copied to clipboard
ContainsAsync too slow
I have 50 items to test the ContainsAsync of Redis filter. It took about 1.5 seconds. And 1000 items took 5 seconds. Its configuation is : Expected Elements:100000, errorate: 0.01. Could u pls tell my how to improve my performace?
Thank you for your feedback. I will solve this problem as soon as possible
Can you provide code snippets?
var bf = FilterRedisBuilder.Build<string>("localhost", "bftest", 100000, 0.01);
var items = new List<string>();
var count = 50;
var rndNum = new Random(Guid.NewGuid().GetHashCode());
for (int i = 0; i < count; i++)
{
items.Add(Helper.GenerateString(rndNum.Next(5, 30)));
}
await bf.AddAsync(items);
var sw = Stopwatch.StartNew();
await bf.ContainsAsync(items);
Console.WriteLine(sw.Elapsed);
`
items elapsed
50 00:00:00.0307170
1000 00:00:00.6043679