markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

check bounds rather than generate exceptions #373

Open bruce-lindsay opened 8 years ago

bruce-lindsay commented 8 years ago

This had a serious performance benefit. In my case (single select fetching 164 records) the catch block for ArgumentOutOfRangeException was hit 432 times. Using an explicit bounds check prevented these exceptions and was noticeably faster

markrendle commented 8 years ago

Thanks for this. I will pull and release patched build next time I'm on my Windows machine.

Sent using CloudMagic [https://cloudmagic.com/k/d/mailapp?ct=pi&cv=6.0.64&pv=8.1.1] On Fri, Aug 7, 2015 at 20:57, markrendle/Simple.Data reply@reply.github.com wrote: This had a serious performance benefit. In my case (single select fetching 164 records) the catch block for ArgumentOutOfRangeException was hit 432 times. Using an explicit bounds check prevented these exceptions and was noticeably faster


YOU CAN VIEW, COMMENT ON, OR MERGE THIS PULL REQUEST ONLINE AT: https://github.com/markrendle/Simple.Data/pull/373 [https://github.com/markrendle/Simple.Data/pull/373]

COMMIT SUMMARY

FILE CHANGES

PATCH LINKS:

— Reply to this email directly or view it on GitHub [https://github.com/markrendle/Simple.Data/pull/373] .[https://github.com/notifications/beacon/AAK4QgteyW0Y_nGiP6D1n5oNJC2y82lLks5olQUQgaJpZM4FnyRa.gif]

bruce-lindsay commented 8 years ago

Great, glad I could help. Do you know what commit SHA produced 0.19.0 nuget package? I'm currently dependent on that version but not sure what SHA to hotfix this against without introducing other changes. Thanks