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

Eliminate more transient allocations: Titles and invalid rectangles and bitmap runs and utf8 conversions #8621

Merged
23 commits merged into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
60bbf49
We never look at just the prefix. So store Title+Prefix concatenated …
miniksa Dec 19, 2020
be5da8d
Finish fixing title. Change all Dirty Areas to be stored in the engin…
miniksa Dec 19, 2020
f66d51e
Make it use wstring_view
miniksa Jan 7, 2021
2983b9d
These should be string views to match.
miniksa Jan 7, 2021
b2e6d6d
Code format!
miniksa Jan 7, 2021
50e8ee8
static analysis
miniksa Jan 7, 2021
141bbd9
fix test things too.
miniksa Jan 7, 2021
ead8fab
Merge branch 'main' into dev/miniksa/perf_title_and_dirty
miniksa Jan 7, 2021
00f80e4
Add held-buffer converter helpers for hot paths.
miniksa Jan 8, 2021
d8cbaed
Hold a conversion buffer string on the VtEngine to prevent hundreds o…
miniksa Jan 8, 2021
1882623
use PMR pool for the vector in the bitmap so we're not alloc/freeing …
miniksa Jan 8, 2021
f378785
Revert "Hold a conversion buffer string on the VtEngine to prevent hu…
miniksa Jan 8, 2021
0f4d33b
Use u16u8 instead of reinventing the wheel on out parameters for conv…
miniksa Jan 8, 2021
1d977b7
code format!'
miniksa Jan 8, 2021
8221b22
Validated in razzle. Forgot to declare the rectangle in bgfx engine.
miniksa Jan 8, 2021
9fefabf
Spell check. codepath --> code path.
miniksa Jan 8, 2021
fa1e14a
missed a noexcept for audit mode.
miniksa Jan 15, 2021
ebbda64
Don't bother adding these functions to Convert since I didn't use 'em…
miniksa Jan 15, 2021
1929b32
Fixed it I think.
miniksa Jan 20, 2021
7662ea8
Merge branch 'main' into dev/miniksa/perf_title_and_dirty
miniksa Feb 12, 2021
c6432ae
ensure that PMR is being used now that it's not strictly a part of th…
miniksa Feb 12, 2021
a6f1b49
Reorder constructors for bitmap how they are in main. Use the three-p…
miniksa Feb 13, 2021
b308974
CODE FORMAT!!!!
miniksa Feb 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/inc/til/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
{
}

bitmap(til::size sz, bool fill) :
bitmap(sz, fill, allocator_type{})
{
}

bitmap(til::size sz, const allocator_type& allocator) :
bitmap(sz, false, allocator)
{
Expand All @@ -181,6 +176,11 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
{
}

bitmap(til::size sz, bool fill) :
bitmap(sz, fill, allocator_type{})
{
}

bitmap(const bitmap& other) :
_alloc{ std::allocator_traits<allocator_type>::select_on_container_copy_construction(other._alloc) },
_sz{ other._sz },
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/vt/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ VtEngine::VtEngine(_In_ wil::unique_hfile pipe,
_lastTextAttributes(INVALID_COLOR, INVALID_COLOR),
_lastViewport(initialViewport),
_pool(til::pmr::get_default_resource()),
_invalidMap(initialViewport.Dimensions(), &_pool),
_invalidMap(initialViewport.Dimensions(), false, &_pool),
Copy link
Member Author

Choose a reason for hiding this comment

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

@DHowett, if I don't call it with three parameters, it is turning the &_pool into bool true. What.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh, automatic coercion of pointer types to booleans (for nullness checks). Ew.

_lastText({ 0 }),
_scrollDelta({ 0, 0 }),
_quickReturn(false),
Expand Down