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

[Рефакторинг] В HubFrame::onCustomDraw часто зовется client->isOp() #961

Closed
pavel-pimenov opened this issue Aug 23, 2015 · 5 comments

Comments

@pavel-pimenov
Copy link
Owner

commented Aug 23, 2015

From Pavel.Pimenov@gmail.com on March 05, 2013 18:46:11

  1. сlient для фрейма - константа
  2. cобытие отрисовки case CDDS_ITEMPREPAINT: вызывается очень часто

Решение

  • закэшировать признак оператора в m_isOP в момент создания фрейма
  • побочный эффект - если юзер вдруг во время работы стал Оператором не сработает подкраска до переподключения.

Original issue: http://code.google.com/p/flylinkdc/issues/detail?id=923

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From Pavel.Pimenov@gmail.com on March 06, 2013 11:06:07

This issue was closed by revision r13139 .

Status: Fixed

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From a.rain...@gmail.com on March 06, 2013 13:43:28

m_isOP = client->isOp();
надо звать не в конструкторе, а после двух событий Connected (CONNECTED), и GetPassword (GET_PASSWORD). В качестве временного решения получения статуса опа на хабе рекомендую добавить ещё и в STATS. Но по хорошему надо подумать над этим вопросом.

Status: Started
Labels: Performance Component-UI

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From a.rain...@gmail.com on March 06, 2013 13:44:51

Ну т.е. совсем по хорошему стоит кешировать в ядре, ибо оно в курсе когда флаг обновляется.

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From a.rain...@gmail.com on March 06, 2013 14:02:02

r13140

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From a.rain...@gmail.com on July 24, 2013 08:21:47

This issue was closed by revision r14699 .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.