couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Cottlehuber (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-1897) optimise binary
Date Wed, 25 Sep 2013 22:50:02 GMT
Dave Cottlehuber created COUCHDB-1897:
-----------------------------------------

             Summary: optimise binary 
                 Key: COUCHDB-1897
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1897
             Project: CouchDB
          Issue Type: Improvement
          Components: Database Core
            Reporter: Dave Cottlehuber


I decided to read up on http://www.erlang.org/doc/efficiency_guide/binaryhandling.html tonight
& found this on `bin_opt_info`:

The erlang compiler can be coaxed into spitting out information on whether it can optimise
binary usage, viz:

erlc +bin_opt_info thing.erl

or use
export ERLC_FLAGS=+bin_opt_info (how I generated the results below)
or alternatively:
export ERL_COMPILER_OPTIONS=bin_opt_info

Some of these may be worth the refactoring effort.

Full list below for reference.

src/couch_index_updater.erl:148: Warning: INFO: matching anything else but a plain variable
to the left of binary pattern will prevent delayed sub binary optimization; SUGGEST changing
argument order
src/couch_replicator_api_wrap.erl:240: Warning: INFO: matching anything else but a plain variable
to the left of binary pattern will prevent delayed sub binary optimization; SUGGEST changing
argument order
src/couch_replicator_utils.erl:205: Warning: INFO: the '=' operator will prevent delayed sub
binary optimization
couch_compress.erl:70: Warning: INFO: the '=' operator will prevent delayed sub binary optimization
couch_compress.erl:82: Warning: INFO: using a matched out sub binary in a guard will prevent
delayed sub binary optimization
couch_file.erl:436: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
couch_file.erl:486: Warning: INFO: matching anything else but a plain variable to the left
of binary pattern will prevent delayed sub binary optimization; SUGGEST changing argument
order
couch_httpd_db.erl:1211: Warning: INFO: using the original binary variable in a guard will
prevent delayed sub binary optimization
couch_httpd_misc_handlers.erl:197: Warning: INFO: a variable to the left of the binary pattern
is used in a guard; will prevent delayed sub binary optimization
couch_passwords.erl:103: Warning: INFO: using a matched out sub binary in a guard will prevent
delayed sub binary optimization
couch_util.erl:109: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
couch_util.erl:385: Warning: INFO: using a matched out sub binary in a guard will prevent
delayed sub binary optimization
couch_util.erl:426: Warning: INFO: using the original binary variable in a guard will prevent
delayed sub binary optimization
couch_db_updater.erl:657: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
json_stream_parse.erl:179: Warning: INFO: the '=' operator will prevent delayed sub binary
optimization
json_stream_parse.erl:334: Warning: INFO: the '=' operator will prevent delayed sub binary
optimization
json_stream_parse.erl:356: Warning: INFO: the '=' operator will prevent delayed sub binary
optimization
json_stream_parse.erl:379: Warning: INFO: the '=' operator will prevent delayed sub binary
optimization
mochijson2.erl:377: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:391: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:413: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:471: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:478: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:485: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:492: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:501: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:510: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:517: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:522: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:530: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
oauth.erl:157: Warning: INFO: using a matched out sub binary in a guard will prevent delayed
sub binary optimization
ibrowse_http_client.erl:1509: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
ibrowse_http_client.erl:1544: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochijson2.erl:395: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:409: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:431: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:489: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:496: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:503: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:510: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:519: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:528: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:535: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:540: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochijson2.erl:548: Warning: INFO: using a matched out sub binary will prevent delayed sub
binary optimization
mochiweb_html.erl:300: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:451: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:471: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:483: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:494: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:505: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:518: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:531: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:551: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:568: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:599: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:627: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:652: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:661: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:677: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:689: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:705: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:721: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_html.erl:744: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_multipart.erl:186: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_multipart.erl:262: Warning: INFO: using a matched out sub binary will prevent delayed
sub binary optimization
mochiweb_multipart.erl:279: Warning: INFO: using the original binary variable in a guard will
prevent delayed sub binary optimization


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message