[Daniel's week] February 4, 2023

Daniel Stenberg daniel at haxx.se
Sat Feb 4 09:24:16 CET 2023


# Daniel's weekly report

## Vacation

I managed to not respond to a single curl mail nor touch any GitHub issues in
my absence! My two refreshing weeks off were excellent and now I am back again
and moving forward at full speed.

## New dev machine

I eventually received all components for my new dev machine and this week me
and my brother Björn put the thing together.

Our first snag was to learn that we did the the power cable from the PSU to
the motherboard wrongly so at the first power on attempt not a single led turn
bright and no fan started to move.

After some quick online research and Björn testing the PSU to make sure it
actually works, we corrected the cable and we could see that the power setup
worked. Something else did not work though.

A few leds turned on but nothing showed on screen. One of those red leds
indicated that the problem was the CPU and after more online research we
realized this disheartening fact: the CPU is too new for the bios version on
the motherboard. In order to flash an new BIOS version on the motherboard, we
need a working CPU because this particular model does not provide a feature
that would allow us to upgrade it without a CPU...

Then, as the hero he is, Björn brought the entire box within him back to his
house and a day later at his house he ripped his own machine to pieces,
extracted his (slightly older but still fairly new) Intel CPU, inserted the
older CPU on my motherboard, upgraded the BIOS version to the latest version
available, then removed his own CPU again and put it back into his own machine
and finally he inserted the *intended* 13th gen Intel core-i7 CPU into the
motherboard and the machine would finally work.

There would be one more snag: the motherboard does not like a fully stocked
64GB of 3600MHz memories inserted as 4 16GB modules. When all modules are
inserted, it apparently only wants to run them at the most at 3100MHz. We work
around this issue now by leaving it with 32GB installed. A minor setback, but
I am convinced I can survive quite a few years into the future with "only" 32
GB of ram.

Björn still has the new machine in his house so I have not yet started
installing or using it. I will post all details in a blog post once things are
in better shape.

## Performance

By a coincident I fell over the URL decoder function in curl and realized that
it called `strtoul()` to convert hexadecimal numbers and it just occurred to
me that it is probably not very fast. My subsequent fix [1] ended up running
my test program 2.8 times faster with the help of some table lookups!

Having improved the decoder, I took a look at the encoder as well and wow, by
replacing the method [2] of how it outputs `%HH` codes, my test case ended up
7.8 times faster than when I started.

In the mean time, Stefan also fell over inefficiencies in the HTTP/2 multiplex 
handling [7] and made curl transfer two streams over the same connection where 
the streams were very evenly distributed over the connection *much* faster. 
Between two and three times increased transfer speeds! We also concluded that 
there is more to do in that area and that we should probably loop back to this 
later this year and see what more we can do to enhance transfer performance 
for multiplexed transfers as we have some good ideas.

## URL parser speed

I got into a conversion with Yagiz Nizipli this week, the author of the ada
URL parser [3] that is being proposed as a replacement for the URL parser used
by node.js. They run speed tests and benchmarks how fast that parses is and
that includes some comparisons with the curl parser.

Not too surprisingly (to me), their parser outperforms the curl one with some
two-digit percents or so. Ada parses WHATWG URLs and is not compliant with
curl's parser and the parsers are not on 100% feature parity, but I still
found it interesting and it certainly shows that more can be done to the curl
parser to make it faster.

Of course we can also debate about what exactly faster means and for what URLs
we should optimize the parser etc. Still I found a few minor tweaks that I
landed this week. Probably too small to actually be noticeable though.

## FOSDEM

The first FOSDEM I attended was 2010. Since then, I have visited every
physical version of this awesome conference and I'm thrilled to do it again
this weekend. This is also why my weekly report goes out a little early this
week: I'm taking off mid-day Friday to Brussels and then I will hang out with
friends, talk and live Open Source for an entire weekend, drink beer, eat
waffles and hopefully hand out a lot of curl stickers.

## GitHub Accelerator

I am a member of brand new the GitHub Accelerator program [4], and this week
we had our first meeting in what seems like an impossible task in selecting
the first 20 "fellows".

I won't give away any details or numbers now, but man there are many really
awesome people, projects and applications in there.

## GitHub Star

On the subject of GitHub, I was also this week confirmed a "GitHub star"[5] in
2023 again. For me, one of the best perks that comes with this honor is that I
get a great channel to the teams behind the service that I use so much. I can
tell them my opinions and views and I get early peeks on what they're working
on.

## Blog posts

  - curl's use of many CI services[6]

## Coming up

  - start preparing the Feb 15 release
  - write security advisories for the pending security fixes

## Links

[1] = https://github.com/curl/curl/pull/10376
[2] = https://github.com/curl/curl/pull/10377
[3] = https://github.com/ada-url/ada
[4] = https://accelerator.github.com/
[5] = https://stars.github.com/
[6] = https://daniel.haxx.se/blog/2023/02/01/curls-use-of-many-ci-services/
[7] = https://github.com/icing/blog/blob/main/curl-2023-02-03.md

-- 

  / daniel.haxx.se


More information about the daniel mailing list