tozd / node-reactive-postgres

Reactive queries for PostgreSQL
https://www.npmjs.com/package/reactive-postgres
BSD 3-Clause "New" or "Revised" License
32 stars 4 forks source link

Response latency is suprisingly high in comparison with other projects #3

Closed mitar closed 5 years ago

mitar commented 5 years ago

See results here. It also varies a lot and has some very high spikes.

In comparison, pg-live-select has very predictable under 500 ms responses.

mitar commented 5 years ago

This has been fixed by moving away from using a materialized view and making a refresh a diff query against a temporary table with cache of previous results. Now we also do not use LISTEN/NOTIFY to communicate changes, but changes are directly results of the diff query.