826 Star 2.8K Fork 1.3K

Discuz / DiscuzX

Merged
!523 修复 在部分情况下高亮功能导致页面卡死的问题

popcorner:patch-relatedlink Discuz:master

popcorner Created on: 2020-07-03 22:23

本问题来自交流群内部反馈
复现方式:访问下列页面即可观察到网页卡死的现象
https://www.hostloc.com/forum.php?mod=viewthread&tid=670834&highlight=%E5%8F%91%E5%8D%A1
https://www.discuz.net/forum.php?mod=viewthread&tid=1539544&highlight=%D7%EE%BA%F3%BB%D8%B8%B4
观察可发现,卡死的现象随着tid的增加而变明显。
经分析,此问题是由于key值过大导致循环了太多次,才出现的。而实际调用处仅需要key值不同即可,这个值并不直接参与运行过程。因此将使用key的逻辑去除,改为直接向数组内入值即可。经实际测试可以正常使用,且问题消除。

+1 2
tada 1

6 comments, 4 participants 1182630 gududeweidao 1578945378 1183879 hmily lcg 1578945413 5348438 zapic 1596595062

Show action logs Hide action logs
DiscuzX merged Pull Request 2020-07-18 16:15
DiscuzX check passed 2020-07-18 16:15
popcorner updated description 2020-07-03 23:12
popcorner assigned reviewer 湖中沉 2020-07-03 22:23
popcorner assigned reviewer oldhuhu 2020-07-03 22:23
popcorner assigned reviewer monkeye 2020-07-03 22:23
popcorner assigned reviewer Discuz! 2020-07-03 22:23
popcorner assigned reviewer LooTan 2020-07-03 22:23
popcorner assigned reviewer comsenz-service 2020-07-03 22:23
popcorner assigned reviewer DiscuzX 2020-07-03 22:23
PHP
1
https://gitee.com/Discuz/DiscuzX.git
git@gitee.com:Discuz/DiscuzX.git
Discuz
DiscuzX
DiscuzX

Search

102255 3a0e046c 1850385 102255 7aaa926c 1850385