From a6b630bc64ba2dc3661260b8951cc7bb316910f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 1 Jan 2016 19:47:05 +0100 Subject: Do not consider "." part of names in edlin 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. --- lib/stdlib/src/edlin.erl | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl index 19444c0502..0e9c457de2 100644 --- a/lib/stdlib/src/edlin.erl +++ b/lib/stdlib/src/edlin.erl @@ -465,7 +465,6 @@ word_char(C) when C >= $a, C =< $z -> true; word_char(C) when C >= $ß, C =< $ÿ, C =/= $÷ -> true; word_char(C) when C >= $0, C =< $9 -> true; word_char(C) when C =:= $_ -> true; -word_char(C) when C =:= $. -> true; % accept dot-separated names word_char(_) -> false. %% over_white(Chars, InitialStack, InitialCount) -> -- cgit v1.2.3 From 27b489736a6bd147bd694e83fc0948cbf9d2bce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pe=CC=81ter=20Go=CC=88mo=CC=88ri?= Date: Sat, 12 Dec 2015 22:20:01 +0100 Subject: Use file read buffering in dbg:trace_client Trace files are typically large but contain small terms so we can expect a performance gain from read buffering. dbg:trace_client with a dummy handler ran more then 3x faster on a sample 200MB trace file. fprof:profile can also gain a bit. --- lib/runtime_tools/src/dbg.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl index d2a7d734c1..22b531e6ee 100644 --- a/lib/runtime_tools/src/dbg.erl +++ b/lib/runtime_tools/src/dbg.erl @@ -1269,7 +1269,7 @@ gen_reader(follow_file, Filename) -> %% Opens a file and returns a reader (lazy list). gen_reader_file(ReadFun, Filename) -> - case file:open(Filename, [read, raw, binary]) of + case file:open(Filename, [read, raw, binary, read_ahead]) of {ok, File} -> mk_reader(ReadFun, File); Error -> @@ -1294,7 +1294,7 @@ mk_reader(ReadFun, Source) -> mk_reader_wrap([]) -> []; mk_reader_wrap([Hd | _] = WrapFiles) -> - case file:open(wrap_name(Hd), [read, raw, binary]) of + case file:open(wrap_name(Hd), [read, raw, binary, read_ahead]) of {ok, File} -> mk_reader_wrap(WrapFiles, File); Error -> -- cgit v1.2.3