ericsink / SQLitePCL.raw

A Portable Class Library (PCL) for low-level (raw) access to SQLite
Apache License 2.0
512 stars 106 forks source link

Avoid linear scan operation on large strings. #402

Closed CyrusNajmabadi closed 3 years ago

CyrusNajmabadi commented 3 years ago

Andrew pointed out a good optimization to add here. We shoudln't call GetByteCount on huge strings that certainly will never have a utf8 encoding that is within our threshold.

CyrusNajmabadi commented 3 years ago

FYI @ericsink . This woudl be a good optimization to prevent expensive work if peopel are inserting large strings.

ericsink commented 3 years ago

Yes. I thought I added a positive comment on this yesterday, but alas, it's not here. :-(