• Korhaka@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 hours ago

    I spent hours improving a website to the point first page load was under 100kB from previously multiple MB. Don’t think anyone will care about or appreciate my work.

    I hope somewhere there was someone on a low end device and they experienced a short load time. But it is near certain that I spent more time optimising it than will ever be saved on loading times for a small business site.

    • baines@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 hours ago

      maintainable code is most efficient

      sure there is a trade off but i’d rather runtime be slower than fancy brittle faster code

      • vrek@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        5 hours ago

        Within reason this is true but you also have to agree that it often goes too far. Not everything needs to be an interface or factory. For example if your making a pdf viewer dont concern yourself with abstracting how to open a file, you know it will be a pdf. If someone opens a gif with a pdf reader it’s ok to give an error. Plus to me a lot of “maintainable” code is difficult to work with because there’s so many levels of abstraction and functions spread across multiple files I can’t keep all that in my head.

        Also if you only need one or two functions you don’t need to import a whole library. For example look up “handmade hero” and see how Casey works with the windows libraries.

  • mkwt@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 hours ago

    And I’m still getting at least 20x speedup on my applications. I don’t know where this 0.001 stuff is coming from.

    • NotSteve_@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      8 hours ago

      I think it really depends on the work the program does and how effectively it uses caching, concurrency, etc. Something like data serialisation would probably be a lot slower in Python compared to something like handling simple UI event triggers which might only have that 0.001 difference