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

Do not capture the backtrace for OutOfRange exception. #194

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

jianminzhao
Copy link
Contributor

As the iterator moves beyond the end of the array or dict, the implementation will throw FleeceException with error code OutOfRange. This is necessary to handle the damaged iterator. However, we don't need to capture the backtrace in this case, which is very expensive as shown in a customer's performance profile, c.f. CBL 5044.

As the iterator moves beyond the end of the array or dict, the implementation will throw FleeceException with error code OutOfRange. This is necessary to handle the damaged iterator. However, we don't need to capture the backtrace in this case, which is very expensive as shown in a customer's performance profile, c.f. CBL 5044.
,backtrace(Backtrace::capture(2))
{ }
{
if (code_ != OutOfRange) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth to have a comment here why OurOfRange is ignored.

@jianminzhao jianminzhao requested a review from pasin November 10, 2023 17:36
@jianminzhao jianminzhao merged commit e5115d3 into master Nov 10, 2023
3 checks passed
@jianminzhao jianminzhao deleted the cbl-5044-fleece branch November 10, 2023 22:01
jianminzhao added a commit that referenced this pull request Mar 7, 2024
jianminzhao added a commit that referenced this pull request Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants