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

split tile queue into per-canonical-viewid queues #11250

Merged
merged 6 commits into from
Mar 1, 2025

Conversation

caolanm
Copy link
Contributor

@caolanm caolanm commented Feb 27, 2025

handle the queue associated with the least inactive session first.

Change-Id: Ib14932b20f90d634dca35e9eacef8b005a4a20b7

  • 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

@caolanm caolanm force-pushed the private/caolan/tiletweaking branch from 89aaaef to 03945da Compare February 27, 2025 17:07
@caolanm caolanm closed this Feb 27, 2025
@caolanm caolanm reopened this Feb 27, 2025
@caolanm caolanm force-pushed the private/caolan/tiletweaking branch from 84ecb85 to 8ee7c5c Compare February 28, 2025 09:44
Copy link
Contributor

@mmeeks mmeeks left a comment

Choose a reason for hiding this comment

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

Looks wonderful to me - thanks Caolan ! =) a few silly comments but good stuff.

}
if (maxPrio == std::numeric_limits<float>::min())
LOG_WRN("No sessions match this viewId " << desc.getNormalizedViewId());
// LOG_TRC("Priority for tile " << desc.generateID() << " is " << maxPrio);
return maxPrio;
}

std::vector<TilePrioritizer::ViewIdInactivity> Document::getViewIdsByInactivity() const
Copy link
Contributor

Choose a reason for hiding this comment

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

Like it =)

@@ -1275,35 +1275,34 @@ bool ChildSession::clientVisibleArea(const StringVector& tokens)
return true;
}

float ChildSession::getTilePriority(const TileDesc &tile) const
TilePrioritizer::Priority ChildSession::getTilePriority(const TileDesc &tile) const
Copy link
Contributor

Choose a reason for hiding this comment

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

Love it =)

virtual float getTilePriority(const TileDesc &) const { return 0.0; }

enum class Priority {
NONE = -1, // an error
Copy link
Contributor

Choose a reason for hiding this comment

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

Good this is the right way around - amusingly the core scheduler's priority enum is inverted - so small values are high priority for no really obvious reason ;-)

@caolanm caolanm closed this Feb 28, 2025
@caolanm caolanm reopened this Feb 28, 2025
@caolanm caolanm force-pushed the private/caolan/tiletweaking branch from a780510 to ab86029 Compare February 28, 2025 16:36
handle the queue associated with the least inactive session first.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib14932b20f90d634dca35e9eacef8b005a4a20b7
…evels

drops specific check of readonly viewers and combining factors in
general.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib2911e956e295ecaf92474bd222e5c30d470b702
@caolanm caolanm force-pushed the private/caolan/tiletweaking branch from ab86029 to cb824fb Compare February 28, 2025 17:19
Copy link
Contributor

@mmeeks mmeeks left a comment

Choose a reason for hiding this comment

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

Very nice - hopefully there were no mixups with the CanonicalViewId bits as of now - but should save that in future; good stuff :-)

@mmeeks mmeeks enabled auto-merge (rebase) February 28, 2025 20:59
caolanm added 4 commits March 1, 2025 20:55
… rows

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I33e46b4cfd039a82d082c959dbf0de7d7323834d
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ia8c6fe6092d893bc58f2544090607401dbaf1811
since:

commit ef4cf82
CommitDate: Tue Dec 17 13:27:57 2024 +0000

    Simplify preview merging special cases.

so lets drop it and remove the angst

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2c69daaab3671eba7d9db3220800554c80c9cf9b
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I181e6e84ac773af36290529c9629fd1871327a8c
@caolanm caolanm force-pushed the private/caolan/tiletweaking branch from cb824fb to c3fcc86 Compare March 1, 2025 20:58
@mmeeks mmeeks merged commit 2e524e8 into master Mar 1, 2025
18 of 19 checks passed
@mmeeks mmeeks deleted the private/caolan/tiletweaking branch March 1, 2025 21:39
@@ -987,7 +987,7 @@ void Document::renderTiles(TileCombined &tileCombined)
}

// if necessary select a suitable rendering view eg. with 'show non-printing chars'
if (tileCombined.getCanonicalViewId())
if (tileCombined.getCanonicalViewId() != CanonicalViewId::None)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we allow Invalid here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was the case before that only 0 was checked for here, so that's unchanged. There are two "special" numbers used for CanonicalViewIds, -1 and 0, and it's a little unclear if that's intentional. I only wanted to capture existing practice with this enumification.

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

Successfully merging this pull request may close these issues.

3 participants