Avoid instantiating the module during recalculate
parent
f676dc03c8
commit
376d05f797
|
@ -88,7 +88,7 @@ class PayloadSet < ModuleSet
|
|||
|
||||
# Cache the payload's size
|
||||
begin
|
||||
sizes[name] = p.new.size
|
||||
sizes[name] = p.cached_size || p.new.size
|
||||
# Don't cache generic payload sizes.
|
||||
rescue NoCompatiblePayloadError
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue