cube icon indicating copy to clipboard operation
cube copied to clipboard

Slower display of results

Open ghostaccount737 opened this issue 7 years ago • 5 comments

Describe the bug It's taking some seconds to have the visualizations rendered on a variety of data in firefox

To Reproduce

slow

ghostaccount737 avatar Aug 09 '19 17:08 ghostaccount737

@PVinay737 Hey Vinay! Thanks for posting this one! Could you please provide all server logs for these steps and also screenshot of developer tools network tab where all request times can be seen.

paveltiunov avatar Aug 09 '19 18:08 paveltiunov

Screenshots to developer tools

devlog

Server log

> [email protected] dev /home/vinay/mongo-tutorial
> cubejs-dev-server

🔓 Authentication checks are disabled in developer mode. Please use NODE_ENV=production to enable it.
🦅 Dev environment available at http://localhost:4000
🚀 Cube.js server is listening on 4000
Compiling schema: {"version":"default_schema_version_00ccaaeed2a28d1a6913df054c3377a5"}
Load Request: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Load Request: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Query started: {"query":"SELECT count(*) `zips__count` FROM test.zips AS `zips` LIMIT 10000","params":[]}
Missing cache for: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Missing cache for: {"cacheKey":["select count(*) from test.zips AS `zips`",[]]}
Added to queue: {"priority":10,"queueSize":1,"queryKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Added to queue: {"priority":0,"queueSize":2,"queryKey":["select count(*) from test.zips AS `zips`",[]]}
Performing query: {"queueSize":2,"queryKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Performing query: {"queueSize":2,"queryKey":["select count(*) from test.zips AS `zips`",[]]}
Query started: {"query":"SELECT count(*) `zips__count` FROM test.zips AS `zips` LIMIT 10000","params":[]}
Missing cache for: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Missing cache for: {"cacheKey":["select count(*) from test.zips AS `zips`",[]]}
Performing query completed: {"queueSize":2,"duration":353,"queryKey":["select count(*) from test.zips AS `zips`",[]]}
Renewed: {"cacheKey":["select count(*) from test.zips AS `zips`",[]]}
Renewed: {"cacheKey":["select count(*) from test.zips AS `zips`",[]]}
Missing cache for: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Missing cache for: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Performing query completed: {"queueSize":2,"duration":360,"queryKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  LIMIT 10000",[],[]]}
Query completed: {"duration":373,"query":"SELECT count(*) `zips__count` FROM test.zips AS `zips` LIMIT 10000","params":[]}
Query completed: {"duration":54,"query":"SELECT count(*) `zips__count` FROM test.zips AS `zips` LIMIT 10000","params":[]}
Load Request Success: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Load Request Success: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Load Request: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"dimensions\":[\"Zips.city\"],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Load Request: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"dimensions\":[\"Zips.city\"],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Query started: {"query":"SELECT `zips`.city `zips__city`, count(*) `zips__count` FROM test.zips AS `zips` GROUP BY 1 ORDER BY 2 DESC LIMIT 10000","params":[]}
Missing cache for: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Found cache entry: {"cacheKey":["select count(*) from test.zips AS `zips`",[]],"time":1565376652587,"renewedAgo":7128,"renewalKey":"SQL_QUERY_RESULT_STANDALONE_296c52246bc5ddc9ab96a363730895c8","newRenewalKey":"SQL_QUERY_RESULT_STANDALONE_296c52246bc5ddc9ab96a363730895c8","renewalThreshold":120}
Using cache for: {"cacheKey":["select count(*) from test.zips AS `zips`",[]]}
Added to queue: {"priority":10,"queueSize":1,"queryKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Missing cache for: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Performing query: {"queueSize":1,"queryKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Query started: {"query":"SELECT `zips`.city `zips__city`, count(*) `zips__count` FROM test.zips AS `zips` GROUP BY 1 ORDER BY 2 DESC LIMIT 10000","params":[]}
Missing cache for: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Found cache entry: {"cacheKey":["select count(*) from test.zips AS `zips`",[]],"time":1565376652587,"renewedAgo":7139,"renewalKey":"SQL_QUERY_RESULT_STANDALONE_296c52246bc5ddc9ab96a363730895c8","newRenewalKey":"SQL_QUERY_RESULT_STANDALONE_296c52246bc5ddc9ab96a363730895c8","renewalThreshold":120}
Using cache for: {"cacheKey":["select count(*) from test.zips AS `zips`",[]]}
Missing cache for: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Performing query completed: {"queueSize":1,"duration":257,"queryKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Renewed: {"cacheKey":["SELECT\n      `zips`.city `zips__city`, count(*) `zips__count`\n    FROM\n      test.zips AS `zips`\n  GROUP BY 1 ORDER BY 2 DESC LIMIT 10000",[],[]]}
Query completed: {"duration":259,"query":"SELECT `zips`.city `zips__city`, count(*) `zips__count` FROM test.zips AS `zips` GROUP BY 1 ORDER BY 2 DESC LIMIT 10000","params":[]}
Query completed: {"duration":249,"query":"SELECT `zips`.city `zips__city`, count(*) `zips__count` FROM test.zips AS `zips` GROUP BY 1 ORDER BY 2 DESC LIMIT 10000","params":[]}
Load Request Success: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"dimensions\":[\"Zips.city\"],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}
Load Request Success: {"query":"{\"measures\":[\"Zips.count\"],\"timeDimensions\":[],\"dimensions\":[\"Zips.city\"],\"filters\":[]}","authInfo":{"iat":1565376626,"exp":1565463026}}


ghostaccount737 avatar Aug 09 '19 19:08 ghostaccount737

@PVinay737 Given logs you provided I assume delay you experience is browser rendering time rather than cube.js data retrieval.

paveltiunov avatar Aug 09 '19 19:08 paveltiunov

@paveltiunov agreed and the delay remains despite adding pre-aggregations or caching

ghostaccount737 avatar Aug 11 '19 12:08 ghostaccount737

@PVinay737 Yeah. I believe it's rendering time. As rendering is not part of cube.js I'm closing this issue. You can consider adjusting row limit for rendering or use some type of virtual elements rendering if you still need to show thousands of rows.

paveltiunov avatar Aug 11 '19 19:08 paveltiunov