diff --git a/docs/api-reference/apidocs.swagger.json b/docs/api-reference/apidocs.swagger.json index ad35c25ae..7ce7a89c4 100644 --- a/docs/api-reference/apidocs.swagger.json +++ b/docs/api-reference/apidocs.swagger.json @@ -3,7 +3,7 @@ "info": { "title": "Permify API", "description": "Permify is an open source authorization service for creating fine-grained and scalable authorization systems.", - "version": "v1.4.5", + "version": "v1.4.6", "contact": { "name": "API Support", "url": "https://github.com/Permify/permify/issues", diff --git a/docs/api-reference/openapiv2/apidocs.swagger.json b/docs/api-reference/openapiv2/apidocs.swagger.json index e0e3ec501..fb10cb2a7 100644 --- a/docs/api-reference/openapiv2/apidocs.swagger.json +++ b/docs/api-reference/openapiv2/apidocs.swagger.json @@ -3,7 +3,7 @@ "info": { "title": "Permify API", "description": "Permify is an open source authorization service for creating fine-grained and scalable authorization systems.", - "version": "v1.4.5", + "version": "v1.4.6", "contact": { "name": "API Support", "url": "https://github.com/Permify/permify/issues", diff --git a/internal/engines/entity_filter.go b/internal/engines/entity_filter.go index a15631377..e3593847f 100644 --- a/internal/engines/entity_filter.go +++ b/internal/engines/entity_filter.go @@ -433,14 +433,11 @@ func (engine *EntityFilter) lt( // pathChainEntrance handles multi-hop relation chain traversal for nested attributes // -// TODO: This function can be optimized for better performance by implementing smart batching logic: +// TODO: Optimize performance with smart batching: // - Extract unique attributes from path chain entrances to avoid duplicate queries -// - Implement batch vs individual processing based on scope and attribute count: -// - Use batch mode when we have scope (limited entity IDs) or few attributes (<=1) -// - Use individual mode when no scope and multiple attributes to avoid loading large result sets -// - Refactor into smaller helper functions: extractUniqueAttributes, getScopeIds, shouldUseBatchMode, -// processBatchMode, processIndividualMode, queryAttributesBatch, processEntranceWithResults -// - Remove debug statements after optimization is tested +// - Use batch processing when scope limits entity IDs or when attribute count is low (<=1) +// - Use individual processing when no scope exists and multiple attributes are present +// - Consider refactoring into helper functions for improved maintainability func (engine *EntityFilter) pathChainEntrance( ctx context.Context, request *base.PermissionEntityFilterRequest, diff --git a/internal/info.go b/internal/info.go index f87f5b819..3d5cf58f2 100644 --- a/internal/info.go +++ b/internal/info.go @@ -23,7 +23,7 @@ var Identifier = "" */ const ( // Version is the last release of the Permify (e.g. v0.1.0) - Version = "v1.4.5" + Version = "v1.4.6" ) // Function to create a single line of the ASCII art with centered content and color diff --git a/pkg/pb/base/v1/openapi.pb.go b/pkg/pb/base/v1/openapi.pb.go index f3eb201a4..88b6483a5 100644 --- a/pkg/pb/base/v1/openapi.pb.go +++ b/pkg/pb/base/v1/openapi.pb.go @@ -28,7 +28,7 @@ const file_base_v1_openapi_proto_rawDesc = "" + "\x15base/v1/openapi.proto\x12\abase.v1\x1a.protoc-gen-openapiv2/options/annotations.protoB\xf9\x03\x92A\xeb\x02\x12\x9c\x02\n" + "\vPermify API\x12mPermify is an open source authorization service for creating fine-grained and scalable authorization systems.\"J\n" + "\vAPI Support\x12)https://github.com/Permify/permify/issues\x1a\x10hello@permify.co*J\n" + - "\x10AGPL-3.0 license\x126https://github.com/Permify/permify/blob/master/LICENSE2\x06v1.4.5*\x01\x022\x10application/json:\x10application/jsonZ#\n" + + "\x10AGPL-3.0 license\x126https://github.com/Permify/permify/blob/master/LICENSE2\x06v1.4.6*\x01\x022\x10application/json:\x10application/jsonZ#\n" + "!\n" + "\n" + "ApiKeyAuth\x12\x13\b\x02\x1a\rAuthorization \x02\n" + diff --git a/playground/public/play.wasm b/playground/public/play.wasm index 177e2cb9d..b3c7ca72b 100644 Binary files a/playground/public/play.wasm and b/playground/public/play.wasm differ diff --git a/proto/base/v1/openapi.proto b/proto/base/v1/openapi.proto index 2ad910d00..c2999d0c2 100644 --- a/proto/base/v1/openapi.proto +++ b/proto/base/v1/openapi.proto @@ -9,7 +9,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Permify API"; description: "Permify is an open source authorization service for creating fine-grained and scalable authorization systems."; - version: "v1.4.5"; + version: "v1.4.6"; contact: { name: "API Support"; url: "https://github.com/Permify/permify/issues";