Conversation
Use updated version of mochiweb/webmachine with deprecated string functions removed. As part of this generate a map of request headers, to handle request headers (without repeated re-normalisation) within the riak_kv_wm_object file. Use of regular expressions is now compiled, and not re-compiled for every request (a cached version is accessed via persistent_term instead). This should be more efficient again once the OTP updates its regex library.
|
There is a general question of where to go with this. There are still some obvious potential avenues for further improvements, and questions:
Perhaps in many cases, if we were to continue refactoring and improving, we would simply be duplicating work already done within Cowboy. The implementation of webmachine is now very similar to cowboy_rest (is cowboy's implementation a copy of webmachine?), but are there advantages of continuing to use webmachine and mochiweb going forward? Considering Cowboy is also related to the PB API, where there is the desire to potentially remove the |
| {riak_pipe, {git, "https://github.com/OpenRiak/riak_pipe.git", {branch, "openriak-3.4"}}}, | ||
| {riak_dt, {git, "https://github.com/OpenRiak/riak_dt.git", {branch, "openriak-3.2"}}}, | ||
| {riak_api, {git, "https://github.com/OpenRiak/riak_api.git", {branch, "openriak-3.4"}}}, | ||
| {riak_api, {git, "https://github.com/OpenRiak/riak_api.git", {branch, "nhse-o34-orkv.i30-string"}}}, |
There was a problem hiding this comment.
Do we want to do this here? I figured that rebar.config would be updated at then end when all dependency branches are ready.
Refactor HTTP GET/PUT API to try and improve efficiency.
Using the general_api _perf test, profiling a node handling all HTTP requests, prior to the change the profile was like:
After this refactor:
In theory the refactoring as removed the biggest cause of CPU use in the HTTP API - lower-casing strings. This is supported in the profile.
the refactoring reduces the number of repeated string lowerings, and across the board stops using deprecated string functions