Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Optimizing Performance and Resource Utilization with Concurrent Asynchronous Execution 🚤 #3479

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ export async function fetch(url, body) {
}

async function initVisualization(id, type) {
let spec = await fetch(`/spec/${type}/${id}`);
var body = undefined;
if (type === 'table') {
// for table, fetch the first 100 rows by default
body = {'type': 'rows', start: 0, end: 100};
}
var data = await fetch(`/data/${type}/${id}`, body);
let [spec, data] = await Promise.all([
fetch(`/spec/${type}/${id}`),
fetch(`/data/${type}/${id}`, body),
]);

window.setSpec(spec);
window.handleInput(data);
Expand Down