Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progressive rendering: use the previous word count for the word rate #198560

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Nov 17, 2023

For #198558

I assume the goal of progressive rendering is to spread out rendering of words so there are no pauses

When the word rate is computed, we currently use the new content to compute the rate. But using that rate we would have already printed the full content, which just arrived.

IMO we should use the previous content.

@aeschli aeschli self-assigned this Nov 17, 2023
@aeschli aeschli marked this pull request as ready for review November 17, 2023 20:04
@VSCodeTriageBot VSCodeTriageBot added this to the November 2023 milestone Nov 17, 2023
@aeschli aeschli merged commit 6e91b53 into main Nov 20, 2023
7 checks passed
@aeschli aeschli deleted the aeschli/toxic-jackal-220 branch November 20, 2023 20:19
Splizard pushed a commit to Splizard/vscode-mobile that referenced this pull request Nov 21, 2023
…icrosoft#198560)

* progressive rendering: use the previous word count for the word rate
@roblourens
Copy link
Member

I don't follow- this is computing the rate that text has loaded, so all the words over all the time. You are excluding the latest words, but still dividing over the full range of time. Why is that better?

@roblourens
Copy link
Member

But using that rate we would have already printed the full content

The goal is just to estimate the average rate at which words are loading, and render the next block at that rate.

@aeschli
Copy link
Contributor Author

aeschli commented Nov 30, 2023

Let's say we receive 10 new words every second. At second 1 we receive the first 10 words. At second 5 we had 40 words and receive another 10 words.
Before, the average was computed on the new total: 50 words in 5 seconds = (10w/s). Shorty after 5 seconds, the evaluation would be that we should have printed 50 words by now, so we would print the new 10 words, in one go, to reach the 50 words.
But really we only had 40 words to render at second 5. So by setting the rate to 40 words in 5 seconds (8w/s) we basically slow things down to evenly stretch out the printing.

@roblourens
Copy link
Member

I see- I'm not worried about rendering at a nice even rate. I'm trying to compute the rate that words are coming in, and try to match that rate so that we don't fall too far behind. I think we should always start printing faster, if we can.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants