Joan Miquel Torres
14dc8dd100
Use performance.now() instead of Date.now()... ( #3483 )
...
* Use performance.now() instead of Date.now()...
* Wherever applicable (measuring performance, not time).
* Failback to support node < 16.0.0 (perf_hook not globally exposed)
* Failback to Date.now() for node < 8.5.0
✔ Tests passed with node > 16.0.0 (22.12.0)
✕ Couldn't pass with node prior 16.0.0 but not due to this changes.
https://nodejs.org/docs/latest-v8.x/api/perf_hooks.html#perf_hooks_performance_now
https://w3c.github.io/hr-time/
* Yarn prettier
* More lint fixes.
* Removed polyfill code for node <16
They are no longer supported:
https://github.com/brianc/node-postgres/pull/3483#issuecomment-2967119692
2025-06-14 16:38:51 -05:00
Brian C
9e7a5d97cf
Replace all usages of var with let / const - eslint auto applied ( #3444 )
2025-04-27 11:50:33 -05:00
Alex Anderson
9b510373a6
eslint: enable recommended ruleset ( #3263 )
2025-04-12 08:17:33 +00:00
Brian C
c53a472a60
Batch network packets in prepared statements ( #3402 )
...
* Batch network packets in prepared statements
Fixes #3340
Fixes #3325
Fixes #3098
* Fix type-o but mostly retrigger build for CF pages preview
2025-03-17 10:28:46 -05:00
Alex Anderson
16322c2d50
Fix eslint violations ( #3078 )
...
Co-authored-by: alxndrsn <alxndrsn>
2023-10-19 10:27:25 -05:00
Brian C
07988f985a
Speed up bind functionality ( #2286 )
...
Move from 3 loops (prepareValue, check for buffers, write param types, write param values) to a single loop. This speeds up the insert benchmark by around 100 queries per second. Performance improvement depends on number of parameters being bound.
2020-11-04 08:27:40 -06:00
Brian M. Carlson
66e1e76c9b
More refactoring
2020-07-15 11:05:31 -05:00
regevbr
69af2672ed
fix: major performance issues with bytea performance #2240
2020-07-03 17:56:13 +03:00
regevbr
bf53552a15
fix: major performance issues with bytea performance #2240
2020-07-03 17:53:22 +03:00
regevbr
64c78b0b0e
fix: major performance issues with bytea performance #2240
2020-07-03 17:52:26 +03:00
Brian M. Carlson
c13cf81ee8
Lint pg & turn off semicolons
2020-04-10 10:47:57 -05:00
Brian C
ae5dae4fa4
Make several small speed tweaks for binary reading & writing ( #2158 )
2020-04-09 14:58:48 -05:00
Brian C
2013d77b28
Parser speed improvements ( #2151 )
...
* Change from transform stream
* Yeah a thing
* Make tests pass, add new code to travis
* Update 'best' benchmarks and include tsc in pretest script
* Need to add build early so we can create test tables
* logging
2020-04-02 16:48:22 -05:00
Brian M. Carlson
b0be9da986
Cleanup
2019-12-19 18:57:48 -06:00
Brian M. Carlson
d2cad38452
Dont use experimental parser yet
2019-12-19 07:39:04 -06:00
Brian M. Carlson
e5d46749c0
Work in progress...convert to more efficient reader
2019-12-18 23:44:43 -06:00