#1389 util.serialization: Creates new serializer instance on each call
Reporter
Zash
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Milestone-0.11
Status-Fixed
Performance
Type-Defect
Zash
on
What steps will reproduce the problem?
1. call util.serialization.serialize() a lot
What is the expected output?
Should be fast and efficient
What do you see instead?
Because it creates a default configuration on each call, a needless amount of memory allocations are done.
Most users of the library don't yet create a serializer instance with any special settings,
instead using the default, causing new instance being created each call.
What version of the product are you using?
0.11.x
What steps will reproduce the problem? 1. call util.serialization.serialize() a lot What is the expected output? Should be fast and efficient What do you see instead? Because it creates a default configuration on each call, a needless amount of memory allocations are done. Most users of the library don't yet create a serializer instance with any special settings, instead using the default, causing new instance being created each call. What version of the product are you using? 0.11.x
Fixed in https://hg.prosody.im/trunk/rev/7a36b7ac309b
Changes