Remove performance logs (#6709)
We have found the root cause of the issue: - when using a datasource (including the cached ones), we are fetching ObjectMetadataCollection from cache (700kB). Datasource usage is happening any time we are using twentyORM, which is everywhere in the jobs and in some resolvers (including the GetCurrentUser one). This is leading to a high load on redis and leading to the performance issues we are seeing. - we actually don't need to fetch this objectMetadataCollection while using a cached datasource, only when we instantiate a new one
This commit is contained in:
@ -16,7 +16,6 @@ export class CacheManager<T> {
|
||||
return this.cache.get(cacheKey)!;
|
||||
}
|
||||
|
||||
// Remove old entries with the same workspaceId
|
||||
for (const key of this.cache.keys()) {
|
||||
if (key.startsWith(`${workspaceId}-`)) {
|
||||
await onDelete?.(this.cache.get(key)!);
|
||||
@ -24,7 +23,6 @@ export class CacheManager<T> {
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new value using the factory callback
|
||||
const value = await factory();
|
||||
|
||||
if (!value) {
|
||||
|
||||
Reference in New Issue
Block a user