forked from maxcoto/graphoid
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix performance for build_operand with dynamic attributes (#106)
# Description ✍️ Improve the `build_operand` performance for dynamic attributes by avoid an unecessary call for include? method. Before when using include? method for a Mongoid::Criteria, it was triggering an useless getMore query for Mongo db. Example: ``` [dfd90178-0ec0-4fb5-96bb-976c35a73fa3] MONGODB | mongo:27017 req:1741 | database-prod-db.getMore | SUCCEEDED | 0.050s D, [2023-06-27T08:22:43.076259 #154900] DEBUG -- : [7e1a125e-9fb2-4d85-865b-fb3946ffa991] MONGODB | mongo1:30001 req:1758 conn:1:1 sconn:560 | database-prod-db.getMore | STARTED | {"getMore"=>#<BSON::Int64:0x00007fc9a636df90 @value=3664912834551063330>, "collection"=>"my_entries", "$db"=>"database-prod-db", "$clusterTime"=>{"clusterTime"=>#<BSON::Timestamp:0x00007fc9a66c5198 @seconds=1687864959, @increment=1>, "signature"=>{"hash"=><BSON::Binary:0x73580 type=generic data=0x0000000000000000...>, "keyId"=>0}}, "lsid"=>{"id"=><BSON::Binary:0x63220 type=uuid data=0xbbc0bfa3cfea4d82...>}} ```
- Loading branch information
1 parent
4ea7e7d
commit af5bd17
Showing
4 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) | |
# Describe your gem and declare its dependencies: | ||
Gem::Specification.new do |gem| | ||
gem.name = 'graphoid' | ||
gem.version = '1.3.0' | ||
gem.version = '1.3.1' | ||
gem.authors = ['Nilton Vasques', 'Maximiliano Perez Coto'] | ||
gem.email = ['[email protected]'] | ||
gem.homepage = 'https://github.com/oxeanbits/graphoid' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: ../.. | ||
specs: | ||
graphoid (1.3.0) | ||
graphoid (1.3.1) | ||
graphql (~> 2.0.21) | ||
rails (>= 6.0) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: ../.. | ||
specs: | ||
graphoid (1.3.0) | ||
graphoid (1.3.1) | ||
graphql (~> 2.0.21) | ||
rails (>= 6.0) | ||
|
||
|