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

anyInput - should only depend on incoming messages from coolwsd. #10681

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

mmeeks
Copy link
Contributor

@mmeeks mmeeks commented Dec 7, 2024

Not on outgoing messages that have come from core.

We should not treat rendering / tile requests as input.

Change-Id: I0ced5ee0f07796e8aae015f31c91cb7845443ea8

  • Resolves: #
  • Target version: master

Summary

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

Sorry, something went wrong.

@mmeeks mmeeks requested review from vmiklos and caolanm December 7, 2024 16:35
@mmeeks mmeeks force-pushed the private/mmeeks/anyinput branch from bf9c16b to f77b67b Compare December 7, 2024 17:53
@vmiklos
Copy link
Contributor

vmiklos commented Dec 9, 2024

I think I added this because the order of events were like this before the change: layout visible area, invalidate visible area, layout the rest, release SolarMutex and let COOL render a tile; so with a large enough document and large enough invalidation we laid out the entire document before trying to paint the visible area.
After the change, the order of events were: layout visible area, invalidate visible area, paint the tiles for the visible area, to the rest of the layout.
So I think the reason to handle "pending tile requests" as input was to give the visible area a priority. But I'll update my optimized build tree and see if indeed the 500ms hang after paste is back with this or my concern is not relevant in practice.
Otherwise the change makes sense to me, just trying to avoid unwanted side-effects.

Copy link
Contributor

@vmiklos vmiklos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; I tested that the "let's render the visible area before the full doc layout" case of #9735 continues to work with this:

before:
13:39:35.820 global.js:564 1733747975820 OUTGOING: uno .uno:Paste
...
13:39:35.829 global.js:564 1733747975829 INCOMING: delta: nviewid=1000 part=0 width=256 height=256 tileposx=7680 tileposy=0 tilewidth=3840 tileheight=3840 oldwid=1 wid=58 ver=58 imgsize=1
=> 9 ms

after:
13:45:14.641 global.js:564 1733748314641 OUTGOING: uno .uno:Paste
...
13:45:14.652 global.js:564 1733748314652 INCOMING: delta: nviewid=1000 part=0 width=256 height=256 tileposx=7680 tileposy=0 tilewidth=3840 tileheight=3840 oldwid=1 wid=89 ver=93 imgsize=1
=> 11 ms

So the cost is the ~same, the old 500ms cost is not returning.

@mmeeks mmeeks enabled auto-merge (rebase) December 9, 2024 18:10
Copy link
Contributor

@Ashod Ashod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mmeeks. One suggestion, but looks good otherwise.

@@ -748,7 +748,7 @@ Document::Document(const std::shared_ptr<lok::Office>& loKit, const std::string&
, _docId(docId)
, _url(url)
, _obfuscatedFileId(Uri::getFilenameFromURL(docKey))
, _queue(std::make_shared<KitQueue>())
, _queue(new KitQueue())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we always create a KitQueue and it seems never reset or re-assign it, perhaps we don't need a pointer at all. This removes an indirection and the many _queue &&.

Not on outgoing messages that have come from core.

We should not treat rendering / tile requests as input.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I0ced5ee0f07796e8aae015f31c91cb7845443ea8
It is no longer used externally, also remove un-used
KitQueue reference, and constify session accessor for later.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I69ca1d6b01a4ca97b6d4815c21c76c5ce8c939e6
@eszkadev eszkadev force-pushed the private/mmeeks/anyinput branch from f77b67b to 5b166f4 Compare December 10, 2024 08:53
@eszkadev
Copy link
Contributor

rebased

@mmeeks mmeeks merged commit 8238d9f into master Dec 10, 2024
14 checks passed
@mmeeks mmeeks deleted the private/mmeeks/anyinput branch December 10, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants