← Back to context

Comment by wsinks

3 years ago

I'm glad you mentioned this in the comments - I was wondering if they were going to touch how applications are sandboxed and everything. I would imagine that is a large part of current 'sluggishness'.

If those mythical safety features actually make an impact then shouldn't they slow down everything, including a hello world program? Yet the performance gap between well-optimized and sluggish software only grows.

  • So, I had to try this. And look what happened on a 2015 Macbook running Monterey (edit: but check the thread below for possible explanation):

      ojs@MacBook-Pro-4 /tmp % time ./a.out 
      Hello world
      ./a.out  0.00s user 0.00s system 1% cpu 0.268 total
      ojs@MacBook-Pro-4 /tmp % time ./a.out
      Hello world
      ./a.out  0.00s user 0.00s system 72% cpu 0.004 total
    

    It's really that slow on first try. The binary was compiled just before running it, and it's the simplest possible hello world using C++ std::cout, compiled with -O3. C version with puts behaves just the same.

    • If applications were only slow the first time I wouldn't have any issue with it. But we all know that's not the case.

      The difference you show depends on the internet connection, on slow wifi I've seen this delay go over 0.7s in the past. But again, just the first time, which is a problem for developers who recompile their code frequently but for the end user experience that's not as relevant.

      3 replies →

Almost certainly not? Sandboxing and anything non-visual can happen at a ridiculously fast pace.

I'd suspect a lot of this is offloading so much of the graphical setup to not the application. Feels like we effectively turned window management into system calls?