Age | Commit message (Collapse) | Author |
|
|
|
* benwilson512/better-maps-with:
Improved maps:with/2 and maps:without/2 algorithm
OTP-13376
|
|
|
|
* nybek/speed_up_supervisor_count_children:
Speed up supervisor:count_children/1; simple_one_for_one
Add supervisor:get_callback_module/1
OTP-13290
|
|
The current implementation is roughly O(N*M) where N is the number of items to be removed, and M is the number of items in the map. This does not include the cost of `maps:from_list` or `maps:to_list`. This leads to pretty horrifying execution times on large maps regardless of how many or few keys are to be removed.
The new implementation is O(N) where N is the number of items to be removed. For each N there's the cost of removing a key from a map, and but in practice that turns out to be a vast improvement for all map sizes I tested
The new maps:take/2 implementation similarly builds a list of keys and values by iterating only the list of desired keys, and then hands it off to maps:from_list. This turned out to be faster than N maps:put calls.
|
|
Speed up supervisor:count_children/1 for simple_one_for_one
supervisors. This is achieved by avoiding looping through all the
child process and verifying that each one is alive.
For a supervisor with 100,000 'temporary' children the count-time will
drop from approx 25ms to about 0.005ms.
For a supervisor with 100,000 'permanent' or 'transient' children the
count-time will drop from approx 30ms to about 0.005ms.
This avoids having the supervisor block for an extended period while
the count takes place. Under normal circumstances the accuracy of the
result should also improve since the duration is too short for many
processes to die during the count.
|
|
This function is used by release_handler during upgrade. This was
earlier implemented in the release_handler, but it required a copy og
the definition of the supervisor's internal state, which caused
problems when this state was updated.
|
|
* rickard/monotonic-time-improvements/OTP-13222:
Introduce time management in native APIs
Introduce time warp safe replacement for safe_fixed option
Introduce time warp safe trace timestamp formats
|
|
* lrascao/stdlib/beam_lib-race-condition/OTP-13278:
Check for already started beam_lib crypto server
|
|
* josevalim/stdlib/edlin/OTP-13281:
Do not consider "." part of names in edlin
|
|
When starting the beam_lib crypto server, don't crash
when it is already running. Some other process might
have already called it.
|
|
The new time warp safe option is safe_fixed_monotonic_time which
gives erlang:monotonic_time().
The safe_fixed option was also slightly changed. It now gives
erlang:timestamp() instead of erlang:now(). This has however
not been documented, so it is considered a compatible change.
The above effects both ets, and dets.
This commit also include the bugfix OTP-13239 for
dets:info(Tab, safe_fixed). The timestamp in the result returned
by dets:info(Tab, safe_fixed) was unintentionally broken as a
result of the time API rewrites in OTP 18.0.
|
|
The module is deprected and will be removed in OTP 19. The reason is
that the module is not used, and that we se no obvious use case for
it.
|
|
The Erlang Code Linter no longer crashes if there is a -deprecated()
attribute but no -module() declaration.
See also ERL-62 at bugs.erlang.org.
|
|
See also ERL-32 at bugs.erlang.org. Thanks to Ben Paxton.
|
|
Today, if you press Ctrl+W inside erl, it will erase word chars including dots.
This may have made sense in the past when Erlang had packages, but today
considering the most common case for dots inside erl is to work with records,
considering the dot part of the word is rather a mistake.
For example, imagine the following code, where [] is the cursor:
1> S#elixir_scope.name[]
When I press Ctrl+W it erases all up to #:
1> S#[]
This patch changes it to the dot is no longer considered part of the name:
1> S#elixir_scope.[]
Which is rather expected behaviour for most use cases of dot in Erlang.
|
|
* josevalim/jv-map-fun-eval-maint:
Use full list of bindings when matching on map keys
OTP-13218
|
|
|
|
* bjorn/stdlib/rand-export_seed/OTP-13162:
Correct rand:export_seed/0 when there is no prior seed
|
|
According to the documentation, rand:export_seed/0 should return
'undefined' if the seed has not been intialized. However, it will
create and return a seed. That means that the following code
will not work as expected:
case rand:export_seed() of
undefined -> rand:seen({1,2,3});
_ -> ok
end,
rand:uniform(Range)
|
|
Add parentheses around annotated type union elements in map pair
types. The bug was introduced in Erlang/OTP 18.0.
|
|
Print constraints as 'V :: T' rather than 'is_subtype(V, T)'.
|
|
erl_lint:format_error/1 would crash with a function error if
conflicting types were given. That was most easily noticed in the
shell:
Eshell V7.0.3 (abort with ^G)
1> <<0/integer-binary>>.
*** ERROR: Shell process terminated! ***
Noticed-by: Aleksei Magusev
|
|
The shell command 'rp' prints strings as lists of integers
when pretty printing of lists is 'false'.
|
|
beam_lib:all_chunks/1 and beam_lib:build_module/1 can be useful
for special-purpose stripping, for example to remove the "Line"
chunk.
|
|
Prior to this patch, the following code would not eval:
X = key,
(fun(#{X := value}) -> true end)(#{X => value})
That's because the key evaluation was using the new
list of bindings introduced on every anonymous fun.
Since keys only match on values defined prior to the
pattern and do not introduce any new binding, we must
use the full and original list of binding.
|
|
OTP-12032
* tomszilagyi/shell-support-del-home-end:
Erlang shell: Support keys Del, Home and End
|
|
* nybek/supervisor_reporting_error:
Fix supervisor reporting error
|
|
|
|
* dgud/stdlib/fix-file-error_log-leak:
stdlib: Fix leaking files after error_logger:logfile(close)
|
|
Introduced when changing state from tuple to record.
|
|
* leoliu/export-catch_exception:
Export shell:catch_exception/1 as documented
|
|
* howleysv/stdlib/compiled-unicode/OTP-12977:
stdlib: Fix bug with unicode detection in re
|
|
Fix bug with unrecognised 'unicode' option in re:split/2,3 &
re:replace/3,4 when using pre-compiled regex.
|
|
We'll need a way to limit the size of the crash report produced
by proc_lib:format(). Add format/3, where the third argument is
a depth argument.
|
|
Add the possibility to truncate big messages to avoid running out
of memory.
|
|
Refactor, simplify, and modernize the code to facilitate future
improvements in the following commits.
|
|
Add the possibility to truncate big messages to avoid running out
of memory.
|
|
Refactor, simplify, and modernize the code to facilitate future
improvements in the following commits.
|
|
A long time ago, errors from the emulator itself was sent as
messages that would end up in the handle_info/2 function.
Those clauses in handle_info/2 can be removed.
The code for handling events tagged 'info' instead of 'info_msg'
can also be taken out.
|
|
* dgud/stdlib/zip-optimize/OTP-12950:
Optimize zip:unzip/2 when uncompressing to memory
|
|
Optimize the case where we are appending to the end of the binary, use
binary syntax to create binaries with room for expansion in the next
loop, instead of using iolist_to_binary which creates a binary of the
exact size and needs to be copied in each loop.
Also remove support the unused Acc as iolists.
|
|
As pointed out by roowe, qlc does not handle errors in early compiler
(scanner, parser) well in OTP 18.0.
|
|
Add support for the Delete, Home and End keys in the Erlang shell.
These keys are ubiquitous on modern keyboards. Having them working
as expected adds to the convenience of working in the shell, since
they are much easier to use than the corresponding Ctrl-{D,A,E} keys.
The implementation is in line with the existing framework of the line
editor and is thus a natural (and minimal) extension.
|
|
|
|
|
|
|
|
* nybek/fix_supervisor_get_childspec:
Fix supervisor:get_childspec/2 for simple_one_for_one
OTP-12841
|
|
* ia/inets/deprecate:
inets: Fix race condition in httpc
inets: Remove use of httpd_conf:clean/1 and httpd_conf:custom_clean/3
inets: Remove use of httpd_conf:make_integer/1
inets: Deprecate functions in util module httpd_conf.erl
|
|
These functions should not be used, there exists better
functions in the standard libraries.
|