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

Editor unusable with large file upload #480

Open
nschneid opened this issue Apr 1, 2022 · 7 comments
Open

Editor unusable with large file upload #480

nschneid opened this issue Apr 1, 2022 · 7 comments
Labels
bug data management related to storage and transportation of trees and treebanks priority refactoring

Comments

@nschneid
Copy link

nschneid commented Apr 1, 2022

I uploaded a large .conllu file (1400 sentences), and while it loaded successfully and I can browse the trees, the editor is too laggy for me to make edits—e.g. if I try to change a deprel it gets stuck. If I just upload the first few sentences from the file, everything works fine.

@keggsmurph21
Copy link
Collaborator

Yeah, this is a bit of an architectural problem. Currently, we just serialize the entire treebank and try to load it on the client here:

this.app.load(serial);

via
app.get("/load", get_treebank, (req, res) => {
CorpusDB(req.treebank).load((err, data) => {
if (err)
res.json({error: err.message});
res.json(data);
});

This is a bit sad, since we really only need to load the sentences one at a time, which we already sorta-support (but just don't use?):

getSentence(id, next) {

@keggsmurph21
Copy link
Collaborator

FWIW, I think we could improve here, but it's a bit tough to make these large changes with confidence. I think maybe if we added some static type information it would be more feasible 😄

@Zensho
Copy link

Zensho commented Jun 9, 2022

I am currently investigating the issue. The problem might be caused by too much load on the working memory or the local storage, will have to look further to see which.

@jonorthwash
Copy link
Owner

jonorthwash commented Jun 10, 2022

if I try to change a deprel it gets stuck

@nschneid, when you say "gets stuck", do you mean that Annotatrix freezes, or just a UI problem like the label staying where it is after updating the tree?

@nschneid
Copy link
Author

As I recall it refused to change the tree or allow further edits.

@jonorthwash jonorthwash added priority refactoring data management related to storage and transportation of trees and treebanks bug labels Jun 10, 2022
@Zensho
Copy link

Zensho commented Jun 10, 2022

The problem seems to be that localStorage in general allows no more than 5200000 characters in total, and with it only taking in strings any large corpus simply exceeds the quota. I will try to use IndexedDB to persist the data as an alternative.

@Zensho
Copy link

Zensho commented Jun 16, 2022

I think maybe if we added some static type information it would be more feasible 😄

Hi Kevin, I am currently working on this issue, and I am wondering what does the above sentence mean, and how would it help in achieving reading only one sentence at a time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug data management related to storage and transportation of trees and treebanks priority refactoring
Projects
None yet
Development

No branches or pull requests

4 participants