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

Web-Editor chokes on larger texts (performance issue) #908

Open
fwolfst opened this issue Jun 27, 2020 · 7 comments
Open

Web-Editor chokes on larger texts (performance issue) #908

fwolfst opened this issue Jun 27, 2020 · 7 comments
Labels

Comments

@fwolfst
Copy link

fwolfst commented Jun 27, 2020

Describe the bug
Editing (e.g. marking a word and making it bold) is slowed down significantly, when the text is big.

To Reproduce

  1. Visit NextCloud in browser
  2. Click on "New Text Document" and enter a name
  3. Copy a larger chunk of text
    3.1. e.g. visit https://en.wikipedia.org/wiki/History_of_England, CTRL+A to mark all text, CTRL+C to copy
    3.2. CTRL+V a couple of times in nextcloud
  4. Mark a word and click on b/bold
  5. Alternatively, mark all text in the markdown viewer (e.g. mouse-based, or CTRL+A) and do the same.

(Notice the lags.)

Nextcloud version: 18.0.6

Browser log

In my case, the sync POST request shows ~1 KB of data. After clicking on the "make bold" icon, it takes a second until the text is displayed in bold (and a 806 byte push event). The longer the text, the more laggy does the UI seem to be. I had a user jump back to google docs because of that :( . The same text felt snappier in Collabora Online/Office.

It seems that the lags occur through client based processing, as push event is shown in the network log only after the second(s) of delay, but here I do not have enough insights into how and when the logging is done (only after all processing?).

@fwolfst fwolfst added the bug Something isn't working label Jun 27, 2020
@fwolfst
Copy link
Author

fwolfst commented Jun 27, 2020

I also posted this in https://help.nextcloud.com/t/built-in-document-editor-chokes-on-medium-sized-files/85684 (no answer in the last two days).

@fwolfst fwolfst changed the title Web-Editor chokes on larger texts Web-Editor chokes on larger texts (performance issue) Jun 28, 2020
@juliushaertl
Copy link
Member

Could you share some details on which browser/OS you are using, as I cannot see any concrete performance issue with a 500kb contatining that wikipedia article multiple times.

@fwolfst
Copy link
Author

fwolfst commented Jul 15, 2020

Could you share some details on which browser/OS you are using, as I cannot see any concrete performance issue with a 500kb contatining that wikipedia article multiple times.

Sure. My document is ~560kb. Firefox 78.0.2 (64-bit), XUbuntu 18.04 (although not using xfce).
I have to say that the lag now is considerably smaller than when reported, and it believe it makes a difference whether the change is done in the beginning of the document vs at the end of the document.
Still, pressing CTRL+A (to mark all text) lets firefox report me that a page is slowing down my browser and asking whether I want to stop it.

@a4bits
Copy link

a4bits commented Oct 1, 2020

more details
seems like path
/index.php/apps/text/session/create?fileId=&filePath=&guestName=null&forceRecreate=false
either takes very long to load or comes out with error

"An exception occurred while executing 'INSERT INTO oc_text_documents (id, last_saved_version_time, last_saved_version_etag, base_version_etag) VALUES(?, ?, ?, ?)' with params [, 1601478775, "be32176e6f31380889fc6f9462c2422e", "be32176e6f31380889fc6f9462c2422e"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'"

and its not only on big files

@max-nextcloud
Copy link
Collaborator

@a4bits that sounds like a different issue entirely. Are you still seeing this? Please open a new issue for it and include your app version.

@max-nextcloud
Copy link
Collaborator

max-nextcloud commented Aug 29, 2022

@fwolfst Could you try again with a recent version of Nextcloud? I think the responsiveness of large files has improved a lot except for a few corner cases.

I just tried this on our Nextcloud 24 instance and had no sluggishness what so ever - however I'm running on a fairly fast computer and the server has quite a bit of resources too. So would be nice if you could try to confirm.

@luka-nextcloud
Copy link
Contributor

I copied the big data from the wiki link in the description of the task and then pasted it into the md file. It causes lag when clicking on the icon bold and when scrolling.

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

No branches or pull requests

5 participants