hasura / hasura/graphql-engine

Query vastly outperforms initial subscription fetch

Open
#7,597 2 comments 2 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.0.7

### Environment

OSS

### What is the expected behaviour?

I expect subscription to return the initial results as fast as queries plus the multiplexing window.

### Keywords

"subscription slower"

### What is the current behaviour?

Our multiplexing window is configured to be the default (1 sec). Yet the response time is multiples of a subscription vs its sister query is in the multiple of seconds.

### How to reproduce the issue?

I don't have an exact reproduction, as you can see in the video, the query is fairly simple. We do have a fair bit of complexity in our permission system. I also realized that we are using SQL views there for reducing repetition in our permission system which could kill some optimization Hasura does, in terms of combining permission-checks with relation joins. But that should not be the core of the issue here, I assume, because the sister query is still fast enough.

### Screenshots or Screencast

https://user-images.githubusercontent.com/4051932/134877170-57c89588-5041-4407-b38b-13a131986177.mov

### If the bug is confirmed, would you be willing to submit a PR?

I could try, have not written serious Haskell yet but there is no time like now to learn it

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.