Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
Improve render performance on large html when transforming (HTML/CSS/JS)

I build a time schedule component for a construction company in HTML/JS/CSS. Working Demo here: https://www.conova24.de/performancetest/index.php enter image description here

The schedule can be large (the example has 15700 x 7500 pixel). Therefore it has to be interactive so you can zoom in/out and pan. I achieve this with transforming the schedule div with js using a DOMMatrix.

So far so good! When zoomed in (50% - 100%) the rendering runs smooth. The problem is that the rendering in the browser slows down when you zoom out and see the whole schedule. When zoomed out the rendering takes a lot of cpu and is really slow. enter image description here

Do you have any idea how I can improve the rendering? I also added the "will-change" attribute to the parent div and reduced some unused code in the schedule. Are there any other hacks? I can't imagine that most modern pc's can run 3d games but can't handle a large html document?!

almost 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I noticed you've added the tag JavaScript to the post. Do you have your JavaScript inline or in a different file? If you have it in a different file, make sure you include it in the HTML right above the </body> tag. So almost all the way down under all the other content. Since JavaScript reads from bottom to top, it will slow your site down if you link it in the <head> tag. Furthermore, Here are a few tips to optimize your HTML.

Compress HTML server-side

GZIP compression or a similar compression model allows less data to be sent to an end user’s browser to construct the same page. Total compressed page size is about half as large in MB as the uncompressed page size.

If you’re not compressing HTML and other files, your site is likely slower than competitors.

Minification

Minification deletes all unnecessary whitespace and all new line characters, and is not common practice in HTML. While you can minify HTML if you wish to do so, it can make the document more difficult to read, especially if the page changes often.

Caching

Caching is not always used for HTML either, because HTML files tend to change frequently.

That being said, it is possible to cache HTML. Caching rules allow you to dictate where users’ browsers will request the document from – the cache or the server. Use caution, because you don’t want to serve up an old version of a website. Static HTML pages, like blog posts, can usually be cached without adverse effects.

almost 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda