appmap 0.86.0 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aaf2ec3e35b79244511d47a45f8d3f8f85dc5b666b022cbffe07e6224250f4fd
4
- data.tar.gz: 0eada13772cc55470113fc06c47c5fddac339914a6012eafefc75d350bbb5c81
3
+ metadata.gz: 340b56e93b02e0d530da30ead22c7fe26d067aeac1be6b4188a38819d51c1c82
4
+ data.tar.gz: 0bbae1f5fea6e1040973c15307aa3ef10b0b2e14d86755dc11dbb13e03ddfa8a
5
5
  SHA512:
6
- metadata.gz: 243680c3c2dcf1fe285bf2c2baf4dfe0913b4627bfdcb9654353d4855be3ed3def55973d331ad04ae13a307f710d6eba284313c338f70b8cf5e24025f0e6befe
7
- data.tar.gz: c5715cb83a9d5463208392918cb040505b3a52be12e13cb40936146e2b468efc9932bd3b1233df7f0a05fece28387282009e6abe71a940858735e31ee18885e9
6
+ metadata.gz: f41681a8af1625ce7003f8c02cd312a2b4ae1cffb6f47a8825930eb5c3e721ed95fde409cda5b02c6cf82e08614570fb4835f186861909d896bfa033e500e837
7
+ data.tar.gz: ffc6aac108fd752f599b0af3b0f25b859c3c591789169129e46184f5a8499253f27303acbdbe7985e2154a0ca90a8ed673b5000bed0d3f6f9aa9ca8bbd26c189
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.87.0](https://github.com/applandinc/appmap-ruby/compare/v0.86.0...v0.87.0) (2022-08-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * Improve performance of initial hooking ([901e262](https://github.com/applandinc/appmap-ruby/commit/901e26237027920ede6b0f9d4bc3d175c861b23a))
7
+
1
8
  # [0.86.0](https://github.com/applandinc/appmap-ruby/compare/v0.85.0...v0.86.0) (2022-08-10)
2
9
 
3
10
 
data/lib/appmap/hook.rb CHANGED
@@ -183,12 +183,6 @@ module AppMap
183
183
 
184
184
  hook = lambda do |hook_cls|
185
185
  lambda do |method_id|
186
- # Don't try and trace the AppMap methods or there will be
187
- # a stack overflow in the defined hook method.
188
- next if %w[Marshal AppMap ActiveSupport].member?((hook_cls&.name || '').split('::')[0])
189
-
190
- next if method_id == :call
191
-
192
186
  method = \
193
187
  begin
194
188
  hook_cls.instance_method(method_id)
@@ -197,6 +191,16 @@ module AppMap
197
191
  next
198
192
  end
199
193
 
194
+ package = config.lookup_package(hook_cls, method)
195
+ # doing this check first returned early in 98.7% of cases in sample_app_6th_ed
196
+ next unless package
197
+
198
+ # Don't try and trace the AppMap methods or there will be
199
+ # a stack overflow in the defined hook method.
200
+ next if %w[Marshal AppMap ActiveSupport].member?((hook_cls&.name || '').split('::')[0])
201
+
202
+ next if method_id == :call
203
+
200
204
  next if self.class.already_hooked?(method)
201
205
 
202
206
  warn "AppMap: Examining #{hook_cls} #{method.name}" if LOG
@@ -206,9 +210,6 @@ module AppMap
206
210
  # TODO: Figure out how to tell the difference?
207
211
  next unless disasm
208
212
 
209
- package = config.lookup_package(hook_cls, method)
210
- next unless package
211
-
212
213
  package.handler_class.new(package, hook_cls, method).activate
213
214
  end
214
215
  end
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.86.0'
6
+ VERSION = '0.87.0'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.7.0'
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.86.0
4
+ version: 0.87.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source