I was doing some performance profiling with sequelize and found that a lot of time was being spent in the typeToString(t) function in protocol/packets/Field.js
It's doing a linear lookup in the protocol/contants/types.js file. I switched this to a create a lookup table when the module is loaded and noticed a considerable speed up.
I'm happy to make the code change to this file but wanted to know if there anyone has a preferred approached.
Do you prefer to have lookup table (map) created in the protocol/packets/Field.js file when the module is loaded?
Have the lookup by gex put in the protocol/constants/types.js file as it is in the protocol/constants/errors.js file?
The text was updated successfully, but these errors were encountered: