Lan Tian @ Blog

大幅优化了博客主题性能

本文写于 407 天前, 随着软件更新、外部链接失效等原因,这些内容可能已经不再适用。 如果你发现这些问题,欢迎在评论区指出。

今晚修改了一下主题,删掉了好几个不必要的正则匹配,把页面加载时间(HTTP 头中的 LT-Latency)从 0.25 左右降到了 0.1 左右。

正则表达式功能虽强,但为了性能考虑,还是要谨慎使用。

版权所有 2019 Lan Tian @ Blog

本文链接 https://lantian.pub/article/modify-website/optimize-blog-theme-performance.lantian

CC BY-NC-SA 4.0 协议授权,转载请署名,禁止商业用途,请勿曲解原义

Lan Tian @ Blog 提醒您:

文章千万字,署名第一字。转载不规范,作者两行泪。

 

« 上一篇文章:
NAT64 服务器搭建
  1. SangSir

    SangSir


    Warning: unpack(): Type V: not enough input, need 4, have 0 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 158

    Warning: unpack(): Type V: not enough input, need 4, have 0 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 158

    Warning: unpack(): Type V: not enough input, need 4, have 1 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 473

    Warning: unpack(): Type V: not enough input, need 4, have 0 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 158

    Warning: unpack(): Type V: not enough input, need 4, have 1 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 473

    Warning: unpack(): Type V: not enough input, need 4, have 0 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 158
      
    2018-03-21 21:12:59 沙发 回复 2018-03-21 21:12

    速度确实快了些,不错!

昵称
邮箱
网站
 
Warning: unpack(): Type V: not enough input, need 4, have 1 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 473

Warning: unpack(): Type V: not enough input, need 4, have 0 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 158

Warning: unpack(): Type V: not enough input, need 4, have 1 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 473

Warning: unpack(): Type V: not enough input, need 4, have 0 in /srv/www/lantian.pub/usr/themes/lantian/vendor/itbdw/ip-database/src/IpLocation.php on line 158