neo4jrb / activegraph

An active model wrapper for the Neo4j Graph Database for Ruby.
http://neo4jrb.io
MIT License
1.39k stars 276 forks source link

Don't use exceptions as flow control in for_clause #1627

Closed speedshopnate closed 3 years ago

speedshopnate commented 3 years ago

Hi, this is @nateberkopec's alternate account.

I was noticing ~half a dozen exceptions per page being silently raised and rescued on an app. Raising exceptions is pretty slow, much slower than just asking if the object responds or not.

codeclimate[bot] commented 3 years ago

Code Climate has analyzed commit d1f89334 and detected 0 issues on this pull request.

View more on Code Climate.

codecov-commenter commented 3 years ago

Codecov Report

Merging #1627 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1627   +/-   ##
=======================================
  Coverage   93.91%   93.91%           
=======================================
  Files         126      126           
  Lines        5735     5735           
=======================================
  Hits         5386     5386           
  Misses        349      349           
Impacted Files Coverage Δ
lib/active_graph/node/query/query_proxy_link.rb 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3471247...d1f8933. Read the comment docs.

klobuczek commented 3 years ago

@speedshopnate thanks for that!