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