sidorares / node-mysql2

:zap: fast mysqljs/mysql compatible mysql driver for node.js
https://sidorares.github.io/node-mysql2/
MIT License
4.09k stars 623 forks source link

benchmark TextEncoder vs iconv #627

Open sidorares opened 7 years ago

sidorares commented 7 years ago

node 8.3 now ships with experimental TextEncoder/TextDecoder - https://nodejs.org/dist/latest-v8.x/docs/api/util.html#util_class_util_textdecoder

If perf is considerably better than node-iconv we could feature detect it and use instead of node-iconv when available

/cc @sushantdhiman

sushantdhiman commented 7 years ago

Definitely if benchmarks look good we can switch to WHATWG if environment supports. Node default is built with samll-icu support, which doesnt support full encoding list from WHATWG.

But I see there is a way to load these definitions runtime via ENV variable, https://nodejs.org/dist/latest-v8.x/docs/api/intl.html#intl_providing_icu_data_at_runtime