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

Fix performance issues in prepare_update() #7662

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions src/jrd/vio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@ namespace
{
if (rpb->rpb_flags & rpb_not_packed)
{
rpb->rpb_flags &= ~rpb_not_packed;

const auto length = MIN(rpb->rpb_length, outLength);

memcpy(output, rpb->rpb_address, length);
Expand Down Expand Up @@ -1833,6 +1831,8 @@ void VIO_data(thread_db* tdbb, record_param* rpb, MemoryPool* pool)
const ULONG back_page = rpb->rpb_b_page;
const USHORT back_line = rpb->rpb_b_line;
const USHORT save_flags = rpb->rpb_flags;
const ULONG save_f_page = rpb->rpb_f_page;
const USHORT save_f_line = rpb->rpb_f_line;

while (rpb->rpb_flags & rpb_incomplete)
{
Expand All @@ -1844,6 +1844,8 @@ void VIO_data(thread_db* tdbb, record_param* rpb, MemoryPool* pool)
rpb->rpb_b_page = back_page;
rpb->rpb_b_line = back_line;
rpb->rpb_flags = save_flags;
rpb->rpb_f_page = save_f_page;
rpb->rpb_f_line = save_f_line;
}

CCH_RELEASE(tdbb, &rpb->getWindow(tdbb));
Expand Down