Skip to content

Commit

Permalink
Fixed low speed of LINQ query (#67)
Browse files Browse the repository at this point in the history
* Code update based on #65 (comment)

* Removed IKafkaSerdesFactory and other code clean-up
  • Loading branch information
masesdevelopers authored Oct 4, 2023
1 parent 1608959 commit 6fe86c1
Show file tree
Hide file tree
Showing 16 changed files with 201 additions and 443 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
using MASES.EntityFrameworkCore.KNet.Infrastructure.Internal;
using MASES.EntityFrameworkCore.KNet.Metadata.Conventions;
using MASES.EntityFrameworkCore.KNet.Query.Internal;
using MASES.EntityFrameworkCore.KNet.Serdes.Internal;
using MASES.EntityFrameworkCore.KNet.Storage.Internal;
using MASES.EntityFrameworkCore.KNet.ValueGeneration.Internal;
using System.ComponentModel;
Expand Down Expand Up @@ -72,8 +71,7 @@ public static IServiceCollection AddEntityFrameworkKafkaDatabase(this IServiceCo
.TryAddSingleton<IKafkaSingletonOptions, KafkaSingletonOptions>()
.TryAddSingleton<IKafkaClusterCache, KafkaClusterCache>()
.TryAddSingleton<IKafkaTableFactory, KafkaTableFactory>()
.TryAddScoped<IKafkaDatabase, KafkaDatabase>()
.TryAddScoped<IKafkaSerdesFactory, KafkaSerdesFactory>());
.TryAddScoped<IKafkaDatabase, KafkaDatabase>());

builder.TryAddCoreServices();

Expand Down
6 changes: 2 additions & 4 deletions src/net/KEFCore/Query/Internal/KafkaQueryContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ public virtual IEnumerable<ValueBuffer> GetValueBuffers(IEntityType entityType)
{
if (!_valueBuffersCache.TryGetValue(entityType, out var valueBuffers))
{
valueBuffers = Cluster.GetData(entityType);
valueBuffers = Cluster.GetValueBuffers(entityType);

_valueBuffersCache[entityType] = valueBuffers;
}

return valueBuffers;
}

public KafkaQueryContext(
QueryContextDependencies dependencies,
IKafkaCluster cluster)
public KafkaQueryContext(QueryContextDependencies dependencies, IKafkaCluster cluster)
: base(dependencies)
{
Cluster = cluster;
Expand Down
43 changes: 0 additions & 43 deletions src/net/KEFCore/Serdes/Internal/IKafkaSerdesEntityType.cs

This file was deleted.

31 changes: 0 additions & 31 deletions src/net/KEFCore/Serdes/Internal/IKafkaSerdesFactory.cs

This file was deleted.

125 changes: 0 additions & 125 deletions src/net/KEFCore/Serdes/Internal/KafkaSerdesEntityType.cs

This file was deleted.

54 changes: 0 additions & 54 deletions src/net/KEFCore/Serdes/Internal/KafkaSerdesFactory.cs

This file was deleted.

Loading

0 comments on commit 6fe86c1

Please sign in to comment.