-
Notifications
You must be signed in to change notification settings - Fork 236
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
decouple RichTextFX from string, use CharSequence #282
Comments
There is some recent development towards not caring where the underlying document comes from and how it is represented: you can now implement your own |
Closing this, since the path to have an on-disk document would be quite different than described, namely via implementing a custom |
Hey @TomasMikula so I we got some feedback from our customers basically demanding that we work with text files on the order of 100 MB. I'm willing to be that these files have regular newline characters, meaning the requirement that whole paragraphs be loaded should be a non issue. Looking at the Firstly I'm confused because I'm using the Outside of that, I'd need an implementation of a lazy Observable list for That seems hard. What I'd like to do is parameterize the Any chance I can get that? |
The area assumes that you'll edit the document in some way. Although it sounds like you disable the user's ability to edit it through the UI, it still allows the developer to programmatically modify it throughout the application's lifecycle. As for your other questions, it might be better to let Tomas respond to that. However, he's been silent on this project for about the last month and a half (see #356), so I'm not sure when he'll respond. Have you considered forking this project and modifying it according to your needs? |
(CC: @VinnieH)
Basically I'd like to decouple RichTextFX from
String
s in favor ofCharSequence
s so that I might use @fge's largetext library instead of a flat string. This would make your library fairly agnostic to how it gets the data and give me a shim for lazyness.Note that
CharSequence
specifies the two most critical parts ofString
:subSequence
andcharAt
, in addition to fancy-newIntStream
s forcodePoints()
andchars()
, meaning there shouldn't be anything you can do withString
s you cant do withCharSequence
s. The one major gotcha is thatCharSequence
is not strict about how it implements equality, so you need to be careful when keeping lists or sets of them and callingcontains()
.Its also worth mentioning that LargeText's current
subSequence()
implementation does currently pull the specified subsequence into memory, so if the running code doesn't handle those carefully (possibly with SoftReferences in the case ofparagraphs
?) then the advantage will be nullified.Sound reasonable? I could do it myself, but this eventing/reactive system is new to me so I'm likely to make some silly mistakes.
The text was updated successfully, but these errors were encountered: