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

About the "Deterministic of rendering" #5

Open
tiansh opened this issue Jul 24, 2019 · 4 comments
Open

About the "Deterministic of rendering" #5

tiansh opened this issue Jul 24, 2019 · 4 comments
Labels
technical Issue about the technical proposal

Comments

@tiansh
Copy link

tiansh commented Jul 24, 2019

Current specification describe that "the position and order of each Bullet Chatting is fixed each time it is rendered". When "allowOverlap" is set to false. The position of each bullet chatting is relay on the previous chatting's. User agent have to calculate the position of all chatting's from the very beginning of the list for a certain chatting, which may cause performance issue. And if client try to insert a chatting before current timestamp, should the user agent repaint all chatting's currently shown to fit this change? As I know, There is not any website rendering chatting's like this currently. So, why this characteristics is listed?

@MagicJuly
Copy link
Collaborator

@tiansh Allowing the overlap of Bullet Chatting does bring more calculations. The algorithm used by bilibili is O(n^2), But this did not bring much consumption.
The timing of inserting Bullet Chatting is determined by developer, so <bulletchatlist> only cares about the insertion of <bulletchat>, and does not referring outer data list. this characteristics is listed to illustrate the fact that the Bullet Chatting is rendered with fixed rules and is not random.

@tiansh
Copy link
Author

tiansh commented Aug 2, 2019

I understood that the delay describe the duration from "<bulletchatlist> start playing" to "certain <bulletchat> appearing". But after reading your response, I understood that the delay describe the time from "<bulletchat> element been inserted to dom". This should be clarified in the specification, imo.

@DIYgod
Copy link
Contributor

DIYgod commented Aug 2, 2019

@tiansh delay is not exact the time from <bulletchat> element been inserted to dom, this time also depends on state, so I think "defines when the Bullet Chatting animation begins" is a better description, just like animation-delay

@xfq xfq added the technical Issue about the technical proposal label Nov 24, 2019
@minhluuquang
Copy link

@MagicJuly Can I ask what is the algorithm bilibli using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical Issue about the technical proposal
Projects
None yet
Development

No branches or pull requests

5 participants