Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix block issue by many schedules #198

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

re2zero
Copy link
Contributor

@re2zero re2zero commented Nov 21, 2024

If there are a lot of schedules(recurs), then the UI will be blocked and do any operation become very slow. The root reason is too many json string to response from Dbus.

Log: Fix block issue by many schedules.
Bug: https://pms.uniontech.com/bug-view-274791.html

If there are a lot of schedules(recurs), then the UI will be blocked and do any operation become very slow. The root reason is too many json string to response from Dbus.

Log: Fix block issue by many schedules.
Bug: https://pms.uniontech.com/bug-view-274791.html
Copy link

  • 敏感词检查失败, 检测到2个文件存在敏感词
详情
{
    "calendar-common/src/lunarandfestival/lunarandfestival.h": [
        {
            "line": "static QVector<QString> DiZhi = {\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"};",
            "line_number": 103,
            "rule": "C151",
            "reason": "政治敏感词 | 8503710310"
        }
    ],
    "calendar-common/src/lunarandfestival/method_interface.cpp": [
        {
            "line": "    return TianGan[num % 10] + DiZhi[num % 12];",
            "line_number": 78,
            "rule": "C151",
            "reason": "政治敏感词 | 8503710310"
        }
    ]
}

@myml
Copy link
Member

myml commented Nov 23, 2024

这是同步的以前的补丁吗?

@myml
Copy link
Member

myml commented Nov 23, 2024

改动这么多有测试过吗

@re2zero
Copy link
Contributor Author

re2zero commented Nov 26, 2024

这是同步的以前的补丁吗?

不是以前的补丁,测了以前的版本也有同样的问题,大概率从未测这种场景。

改动这么多有测试过吗

自测了,性能功能都没问题。但有一个疑问:
DSchedule::convertSchedules 来自 DAccountModule::getScheduleTimesOn,其中原来的实现中“扩展”部分没看懂

if (extend) {
                        //需要扩展的天数
...
                        //需要扩展的天数
                    int extenddays = static_cast<int>(schedule->dtStart().daysTo(schedule->dtEnd()));

如果保留,有一定性能影响,UI的显示也很奇怪。可以cherry-pick试试。
DSchedule::expendRecurrence 来自 DAccountModule::extendRecurrence,也同样存在上述“扩展”问题。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: myml, re2zero

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@myml myml merged commit e47a5db into linuxdeepin:master Nov 26, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants