-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Specific component for dealing with large amounts of text data (InputTextArea) #30291
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
The issue here is that this a form input that lends itself to large amounts of data. The problem is that people will write things like
The reason is because we will send ALL the data for this input back an forth between the server and the client or even between JS and .NET in the JS side. We've already had several issues reported about this WRT to it being laggy or leading to to break existing apps in some cases (for example when they exceed the circuit size). This is not the type of primitive that I expect most people will be successful in authoring, so I think it's worth we help here to make people successful. Of particular note is the fact that some people will react to issues in their app by raising the SignalR message size limit, which is not something we want to encourage. What I propose we do here is create an InputTextArea component to deal with this problem using a more sophisticated approach. This might involve breaking the text of the underlying text area into multiple chunks and updating only the chunks that changed, which will drastically reduce the network traffic as well as avoid issues with the message size. |
I definitely agree we should fix this. There are two aspects to the problem:
We may want to address each of these separately. For 1, consider some kind of text diffing system and have it apply to all |
Just going to share some thoughts in case anything triggers an idea. For the scenario where the bind event is input....If you know both the char index of the caret in the input and the length of the input before and after the edit then you can work out what happened and deduce what changed in the text.
Might be a caveat for pasting from clipboard in overwrite mode to replace part of the original where clipboard content is longer. If the diff renderer could be given this information as a hint, perhaps you could have a different strategy for sending that component's diff data over SignalR which
PS: New input from user before round-trip might be a problem (perhaps throttle the input?) For when the bind event is set to when the control loses focus...You could store up to X of these ordered hints in the UI and sent those to the server instead of the whole new value. But, obviously, only if the hints are smaller than the whole data. For when the server changes the value...It might be worth checking the Longest Common Substring algorithm, but only when the string is longer than X characters. |
Split out from #27885
@javiercn Can you fill in details?
Personally I'm not 100% sure about addressing this inside
InputTextArea
. If there's some way we can make it work as a native feature of all events (e.g., even those on a plain<input>
or<textarea>
) that may be preferable.The text was updated successfully, but these errors were encountered: