Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: lessen memory consumptions in a emulated mget method #360

Merged

Conversation

supercaracal
Copy link
Member

@supercaracal supercaracal commented May 4, 2024

Before

allocated memory by gem
-----------------------------------
   5506464  redis-client-0.22.1
    435368  redis-cluster-client/lib
     70110  socket
     10672  uri
      1072  other
allocated memory by location
-----------------------------------
   1640720  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:99
   1027840  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:54
    976160  redis-client-0.22.1/lib/redis_client/command_builder.rb:9
    788688  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:189
    488440  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:38
    187440  redis-client-0.22.1/lib/redis_client/ruby_connection/buffered_io.rb:32
    175840  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:175
    160000  redis-cluster-client/lib/redis_client/cluster/key_slot_converter.rb:71
    146440  redis-client-0.22.1/lib/redis_client/ruby_connection/buffered_io.rb:39
     75160  redis-cluster-client/lib/redis_client/cluster/command.rb:53
     66512  redis-cluster-client/lib/redis_client/cluster/node.rb:53
     57918  ruby/lib/socket.rb:457
     40440  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:69
     40000  redis-cluster-client/lib/redis_client/cluster.rb:34
     16548  redis-client-0.22.1/lib/redis_client/ruby_connection/buffered_io.rb:18
     11520  redis-cluster-client/lib/redis_client/cluster/node.rb:346
     11232  redis-cluster-client/lib/redis_client/cluster/node.rb:359
      9920  ruby/lib/socket.rb:231
      7328  redis-cluster-client/lib/redis_client/cluster/command.rb:50
      7208  redis-cluster-client/lib/redis_client/cluster/node/base_topology.rb:55

After

allocated memory by gem
-----------------------------------
   5541520  redis-client-0.22.1
    355368  redis-cluster-client/lib
     77295  socket
     10672  uri
      1072  other
allocated memory by location
-----------------------------------
   1640800  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:99
   1028320  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:54
    976160  redis-client-0.22.1/lib/redis_client/command_builder.rb:9
    788728  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:189
    488480  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:38
    187520  redis-client-0.22.1/lib/redis_client/ruby_connection/buffered_io.rb:32
    176000  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:175
    146880  redis-client-0.22.1/lib/redis_client/ruby_connection/buffered_io.rb:39
     80000  redis-cluster-client/lib/redis_client/cluster/key_slot_converter.rb:71
     75160  redis-cluster-client/lib/redis_client/cluster/command.rb:53
     66512  redis-cluster-client/lib/redis_client/cluster/node.rb:53
     62055  ruby/lib/socket.rb:457
     49364  redis-client-0.22.1/lib/redis_client/ruby_connection/buffered_io.rb:18
     40480  redis-client-0.22.1/lib/redis_client/ruby_connection/resp3.rb:69
     40000  redis-cluster-client/lib/redis_client/cluster.rb:34
     12400  ruby/lib/socket.rb:231
     11520  redis-cluster-client/lib/redis_client/cluster/node.rb:346
     11232  redis-cluster-client/lib/redis_client/cluster/node.rb:359
      7328  redis-cluster-client/lib/redis_client/cluster/command.rb:50
      7208  redis-cluster-client/lib/redis_client/cluster/node/base_topology.rb:55

@supercaracal supercaracal marked this pull request as ready for review May 4, 2024 00:14
@supercaracal supercaracal merged commit 8fdd23b into redis-rb:master May 4, 2024
27 checks passed
@supercaracal supercaracal deleted the lessen-memory-consumption branch May 4, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant