我可能是更了假新
Tofloor
poster avatar
nicot
deepin
2017-07-04 22:30
Author
大家更新之后有没有发现截图功能比原来还卡了,,,,,,原来只是开机第一次比较慢,之后的一段时间都还行,现在每次都很慢啊,下面这个图我点完录屏就按下快捷键了,你们感受一下

Reply Favorite View the author
All Replies
1 / 2
To page
avatar
jingle
deepin
2017-07-04 22:40
#1
这个不知道录屏时候截图会不会导致慢
需要测试验证下
Reply View the author
avatar
nicot
deepin
2017-07-04 23:36
#2
https://bbs.deepin.org/post/142020
这个不知道录屏时候截图会不会导致慢
需要测试验证下

不录屏的时候差不多也是这个速度
Reply View the author
avatar
duanyao
deepin
2017-07-05 01:00
#3
本帖最后由 duanyao 于 2017-7-4 21:06 编辑
https://bbs.deepin.org/post/142020
这个不知道录屏时候截图会不会导致慢
需要测试验证下

我想让楼主用命令行 `time deepin-screenshot -f --save-path ~/1.png` 测一下截屏花的时间的,然而 --save-path 参数似乎没用啊,还是要弹出保存文件对话框,bug?

我这里 time 数据是:

real  0m3.878s
user  0m0.456s
sys  0m0.076s

real 因为对话框不具有参考价值,但从 user 看,性能还不够理想啊,我是 Core i5 2450M 的 U。
Reply View the author
avatar
158******63
deepin
2017-07-05 01:58
#4
我这边更新后,截图都是秒启啊...
Reply View the author
avatar
22******39@qq.com
deepin
2017-07-05 02:40
#5
wkp 发表于 2017-7-4 17:58
我这边更新后,截图都是秒启啊...

看来是玄学啊
Reply View the author
avatar
kingskill
deepin
2017-07-05 03:54
#6
https://bbs.deepin.org/post/142020
我这边更新后,截图都是秒启啊...

同秒启。和深度终端不相上下。
Reply View the author
avatar
nicot
deepin
2017-07-05 21:02
#7
本帖最后由 nicot 于 2017-7-5 13:03 编辑
https://bbs.deepin.org/post/142020
我想让楼主用命令行 `time deepin-screenshot -f --save-path ~/1.png` 测一下截屏花的时间的,然而 --sav ...
我的没有弹出对话框
real        0m5.266s
user        0m1.224s
sys        0m1.152s
这是我的数据,Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Reply View the author
avatar
nicot
deepin
2017-07-05 21:03
#8
https://bbs.deepin.org/post/142020
我这边更新后,截图都是秒启啊...

并没有秒起的感觉啊
Reply View the author
avatar
duanyao
deepin
2017-07-05 21:50
#9
https://bbs.deepin.org/post/142020
我的没有弹出对话框
real        0m5.266s
user        0m1.224s

确实不太正常啊,你的CPU 应该跟我的性能差不多,然而user和sys时间差这么多,特别是sys耗时太长了。
你再试试 `strace -c deepin-screenshot -f --save-path ~/1.png`(这是记录系统调用的时间),把控制台上的输出贴上来看看。比如我的是这样的:

  1. $ strace -c deepin-screenshot -f --save-path ~/图片/10.png
  2. load translate "/usr/share/dtkwidget/translations/dtkwidget_zh_CN"
  3. load translate "/usr/share/deepin-screenshot/translations/deepin-screenshot_zh_CN"
  4. 2017-07-05, 13:48:46.355 [Debug  ] [                                                         0] deepin-screenshot first started!
  5. 2017-07-05, 13:48:46.356 [Debug  ] [                                                         0] false ""
  6. 2017-07-05, 13:48:46.357 [Debug  ] [                                                         0] MainWindow bgRect: QRect(0,0 1366x768)
  7. 2017-07-05, 13:48:46.391 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  8. 2017-07-05, 13:48:46.391 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  9. 2017-07-05, 13:48:46.392 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  10. 2017-07-05, 13:48:46.392 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  11. 2017-07-05, 13:48:46.392 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  12. 2017-07-05, 13:48:46.392 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  13. 2017-07-05, 13:48:46.393 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  14. 2017-07-05, 13:48:46.393 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  15. 2017-07-05, 13:48:46.468 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  16. 2017-07-05, 13:48:46.468 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  17. 2017-07-05, 13:48:46.470 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  18. 2017-07-05, 13:48:46.471 [Debug  ] [                                                         0] m_keyboardGrabbed: false
  19. 2017-07-05, 13:48:46.476 [Debug  ] [                                                         0] m_keyboardGrabbed: true
  20. 2017-07-05, 13:48:46.677 [Debug  ] [                                                         0] ConfigSettings: "effect" "is_blur" QVariant(bool, false)
  21. 2017-07-05, 13:48:46.777 [Debug  ] [                                                         0] ConfigSettings: "effect" "is_mosaic" QVariant(bool, false)
  22. 2017-07-05, 13:48:46.777 [Debug  ] [                                                         0] Setting file: "/home/duanyao/.config/deepin/deepin-screenshot/tools.conf"
  23. 2017-07-05, 13:48:47.023 [Debug  ] [                                                         0] ConfigSettings: "save" "save_quality" QVariant(int, 100)
  24. 2017-07-05, 13:48:47.026 [Warning] [                                                         0] QStackedWidget::setCurrentWidget: widget 0x0 not contained in stack
  25. 2017-07-05, 13:48:47.075 [Debug  ] [                                                         0] relase event !!!
  26. 2017-07-05, 13:48:47.075 [Debug  ] [                                                         0] keyboardGrabbed: true
  27. 2017-07-05, 13:48:48.138 [Debug  ] [                                                         0] ConfigSettings: "common" "default_savepath" QVariant(QString, "/home/duanyao/图片")
  28. 2017-07-05, 13:48:48.343 [Debug  ] [                                                         0] saveFilePath: "/home/duanyao/图片/深度截图_20170705134847.png"
  29. % time     seconds  usecs/call     calls    errors syscall
  30. ------ ----------- ----------- --------- --------- ----------------
  31. 78.25    0.004000         333        12           fdatasync
  32.   9.98    0.000510           4       124           munmap
  33.   5.42    0.000277          46         6           rename
  34.   4.46    0.000228           0       728           write
  35.   0.63    0.000032           2        13           readlink
  36.   0.53    0.000027           0       954       369 stat
  37.   0.49    0.000025           0      1159       131 futex
  38.   0.25    0.000013           0       485           poll
  39.   0.00    0.000000           0       689           read
  40.   0.00    0.000000           0       759       120 open
  41.   0.00    0.000000           0       647           close
  42.   0.00    0.000000           0       514           fstat
  43.   0.00    0.000000           0       311        10 lstat
  44.   0.00    0.000000           0       134           lseek
  45.   0.00    0.000000           0       571           mmap
  46.   0.00    0.000000           0       372           mprotect
  47.   0.00    0.000000           0        84           brk
  48.   0.00    0.000000           0         5           rt_sigaction
  49.   0.00    0.000000           0         3           rt_sigprocmask
  50.   0.00    0.000000           0        18         1 ioctl
  51.   0.00    0.000000           0       349           writev
  52.   0.00    0.000000           0       891       317 access
  53.   0.00    0.000000           0         3           shmget
  54.   0.00    0.000000           0         3           shmat
  55.   0.00    0.000000           0         4           shmctl
  56.   0.00    0.000000           0         3           socket
  57.   0.00    0.000000           0         3           connect
  58.   0.00    0.000000           0         4           sendto
  59.   0.00    0.000000           0        12         5 recvfrom
  60.   0.00    0.000000           0         1           sendmsg
  61.   0.00    0.000000           0       361       285 recvmsg
  62.   0.00    0.000000           0         1           shutdown
  63.   0.00    0.000000           0         2           getsockname
  64.   0.00    0.000000           0         2           getpeername
  65.   0.00    0.000000           0         7           clone
  66.   0.00    0.000000           0         1           execve
  67.   0.00    0.000000           0         4           kill
  68.   0.00    0.000000           0        15           uname
  69.   0.00    0.000000           0         3           shmdt
  70.   0.00    0.000000           0       101           fcntl
  71.   0.00    0.000000           0         8           flock
  72.   0.00    0.000000           0        34           getdents
  73.   0.00    0.000000           0         8           getcwd
  74.   0.00    0.000000           0         8           unlink
  75.   0.00    0.000000           0         6           chmod
  76.   0.00    0.000000           0         1           getrlimit
  77.   0.00    0.000000           0         1           sysinfo
  78.   0.00    0.000000           0         8           getuid
  79.   0.00    0.000000           0         5           getgid
  80.   0.00    0.000000           0        10           geteuid
  81.   0.00    0.000000           0         7           getegid
  82.   0.00    0.000000           0         2           getresuid
  83.   0.00    0.000000           0         2           getresgid
  84.   0.00    0.000000           0        14         2 statfs
  85.   0.00    0.000000           0       164           fstatfs
  86.   0.00    0.000000           0         2           sched_setscheduler
  87.   0.00    0.000000           0         4           sched_get_priority_max
  88.   0.00    0.000000           0         4           sched_get_priority_min
  89.   0.00    0.000000           0         2           prctl
  90.   0.00    0.000000           0         1           arch_prctl
  91.   0.00    0.000000           0         1           sched_getaffinity
  92.   0.00    0.000000           0         1           set_tid_address
  93.   0.00    0.000000           0        50           fadvise64
  94.   0.00    0.000000           0         1           clock_getres
  95.   0.00    0.000000           0         5           inotify_add_watch
  96.   0.00    0.000000           0         4           inotify_rm_watch
  97.   0.00    0.000000           0         1           set_robust_list
  98.   0.00    0.000000           0         5           eventfd2
  99.   0.00    0.000000           0         4           inotify_init1
  100.   0.00    0.000000           0       110           getrandom
  101. ------ ----------- ----------- --------- --------- ----------------
  102. 100.00    0.005112                  9831      1240 total

Copy the Code

Reply View the author
avatar
nicot
deepin
2017-07-05 22:15
#10
https://bbs.deepin.org/post/142020
确实不太正常啊,你的CPU 应该跟我的性能差不多,然而user和sys时间差这么多,特别是sys耗时太长了。
你 ...

是这样的
➜  ~ `strace -c deepin-screenshot -f --save-path ~/1.png`
load translate "/usr/share/dtkwidget/translations/dtkwidget_zh_CN"
load translate "/usr/share/deepin-screenshot/translations/deepin-screenshot_zh_CN"
2017-07-05, 14:12:13.187 [Debug  ] [                                                         0] deepin-screenshot first started!
2017-07-05, 14:12:13.198 [Debug  ] [                                                         0] false ""
2017-07-05, 14:12:13.201 [Debug  ] [                                                         0] MainWindow bgRect: QRect(0,0 1920x1080)
2017-07-05, 14:12:16.364 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.364 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.365 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.365 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.366 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.366 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.367 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.367 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.419 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.420 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.428 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.433 [Debug  ] [                                                         0] m_keyboardGrabbed: false
2017-07-05, 14:12:16.441 [Debug  ] [                                                         0] m_keyboardGrabbed: true
2017-07-05, 14:12:16.742 [Debug  ] [                                                         0] ConfigSettings: "effect" "is_blur" QVariant(bool, false)
2017-07-05, 14:12:16.896 [Debug  ] [                                                         0] ConfigSettings: "effect" "is_mosaic" QVariant(bool, false)
2017-07-05, 14:12:16.896 [Debug  ] [                                                         0] Setting file: "/home/nicot/.config/deepin/deepin-screenshot/tools.conf"
2017-07-05, 14:12:17.263 [Debug  ] [                                                         0] ConfigSettings: "save" "save_quality" QVariant(int, 100)
2017-07-05, 14:12:17.264 [Warning] [                                                         0] QStackedWidget::setCurrentWidget: widget 0x0 not contained in stack
2017-07-05, 14:12:17.329 [Debug  ] [                                                         0] relase event !!!
2017-07-05, 14:12:17.330 [Debug  ] [                                                         0] keyboardGrabbed: true
2017-07-05, 14:12:17.519 [Debug  ] [                                                         0] ConfigSettings: "common" "default_savepath" QVariant(QString, "clipboard")
2017-07-05, 14:12:17.713 [Debug  ] [                                                         0] saveFilePath: "/tmp/深度截图_20170705141217.png"
No appenders registered with logger
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
[Warning] <> QBuffer::seek: Invalid pos: -18
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
98.94    1.092011        1655       660           read
  0.95    0.010526          10      1015       200 futex
  0.10    0.001096          10       115           munmap
  0.01    0.000062           0       711        98 open
  0.00    0.000010           0       619           close
  0.00    0.000006           0       226         4 lstat
  0.00    0.000005           0        67           fcntl
  0.00    0.000000           0       347           write
  0.00    0.000000           0       655       110 stat
  0.00    0.000000           0       440           fstat
  0.00    0.000000           0       459           poll
  0.00    0.000000           0       132           lseek
  0.00    0.000000           0       557           mmap
  0.00    0.000000           0       369           mprotect
  0.00    0.000000           0        62           brk
  0.00    0.000000           0         5           rt_sigaction
  0.00    0.000000           0         3           rt_sigprocmask
  0.00    0.000000           0        22         1 ioctl
  0.00    0.000000           0       387           writev
  0.00    0.000000           0       655       263 access
  0.00    0.000000           0         2           select
  0.00    0.000000           0         1           mremap
  0.00    0.000000           0         2           shmget
  0.00    0.000000           0         2           shmat
  0.00    0.000000           0         2           shmctl
  0.00    0.000000           0         3           socket
  0.00    0.000000           0         3           connect
  0.00    0.000000           0         4           sendto
  0.00    0.000000           0         9         2 recvfrom
  0.00    0.000000           0         1           sendmsg
  0.00    0.000000           0       292       225 recvmsg
  0.00    0.000000           0         1           shutdown
  0.00    0.000000           0         2           getsockname
  0.00    0.000000           0         2           getpeername
  0.00    0.000000           0         5           clone
  0.00    0.000000           0         1           execve
  0.00    0.000000           0         4           kill
  0.00    0.000000           0        13           uname
  0.00    0.000000           0         2           shmdt
  0.00    0.000000           0         5           flock
  0.00    0.000000           0         8           fdatasync
  0.00    0.000000           0        32           getdents
  0.00    0.000000           0         2           getcwd
  0.00    0.000000           0         4           rename
  0.00    0.000000           0         5           unlink
  0.00    0.000000           0        22           readlink
  0.00    0.000000           0         4           chmod
  0.00    0.000000           0         1           getrlimit
  0.00    0.000000           0         1           sysinfo
  0.00    0.000000           0         8           getuid
  0.00    0.000000           0         5           getgid
  0.00    0.000000           0        10           geteuid
  0.00    0.000000           0         7           getegid
  0.00    0.000000           0         2           getresuid
  0.00    0.000000           0         2           getresgid
  0.00    0.000000           0        10         2 statfs
  0.00    0.000000           0       144           fstatfs
  0.00    0.000000           0         1           arch_prctl
  0.00    0.000000           0         1           sched_getaffinity
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0        42           fadvise64
  0.00    0.000000           0         1           clock_getres
  0.00    0.000000           0         3           inotify_add_watch
  0.00    0.000000           0         2           inotify_rm_watch
  0.00    0.000000           0         1           set_robust_list
  0.00    0.000000           0         5           eventfd2
  0.00    0.000000           0         2           inotify_init1
  0.00    0.000000           0       116           getrandom
------ ----------- ----------- --------- --------- ----------------
100.00    1.103716                  8304       905 total
Reply View the author
avatar
duanyao
deepin
2017-07-06 01:05
#11
本帖最后由 duanyao 于 2017-7-5 17:08 编辑
https://bbs.deepin.org/post/142020
是这样的
➜  ~ `strace -c deepin-screenshot -f --save-path ~/1.png`
load translate "/usr/share/dt ...

你的 read (读文件)耗时很多,达到1秒,我这里几乎是0秒,这是比较大的差异。你是否察觉你的硬盘有什么毛病,比如比较慢?或者你对内核磁盘、缓存、内存相关的东西修改过设置?

另外就是你的输出里多出几行 [Warning] <> QBuffer::seek: Invalid pos: -18 ,不知是什么。 https://bbs.deepin.org/user/48640

你可以再运行一下
strace -ttTfC -e open,read -o ~/ds.strace  deepin-screenshot -f --save-path ~/1.png
看看具体的每次 read 的耗时。这会在主目录下生成 ds.strace 文件,你把它传上来。
Reply View the author
avatar
nicot
deepin
2017-07-06 22:30
#12
https://bbs.deepin.org/post/142020
你的 read (读文件)耗时很多,达到1秒,我这里几乎是0秒,这是比较大的差异。你是否察觉你的硬盘有什么 ...

一直用deepin做主系统,平常打开文件夹和在浏览器中打开文件管理都挺卡的,没改过相关的设置啊~ds.strace.zip
Reply View the author
avatar
duanyao
deepin
2017-07-07 02:15
#13
本帖最后由 duanyao 于 2017-7-6 18:16 编辑
https://bbs.deepin.org/post/142020
一直用deepin做主系统,平常打开文件夹和在浏览器中打开文件管理都挺卡的,没改过相关的设置啊~
...

我看到这两次读取有问题,耗时太长了(最后的尖括号里,单位是秒):
  1. 27147 14:23:55.738116 open("/sys/class/drm/card1/device/config", O_RDONLY) = 19 <0.000024>
  2. 27147 14:23:55.738224 read(19, "\2\20 h\3\5\20\0\201\0\200\3\20\0\0\0\f\0\0\260\0\0\0\0\4\0\0\321\0\0\0\0"..., 64) = 64 <0.483001>

  3. 27147 14:23:56.222012 open("/sys/class/drm/renderD129/device/config", O_RDONLY) = 19 <0.000058>
  4. 27147 14:23:56.222158 read(19, "\2\20 h\7\5\20\0\201\0\200\3\20\0\0\0\f\0\0\260\0\0\0\0\4\0\0\321\0\0\0\0"..., 64) = 64 <3.163166>
Copy the Code


/sys/class/drm/card1/device/config 和 /sys/class/drm/renderD129/device/config 都不是磁盘上的文件,而是内核的虚拟文件,所以看来与磁盘关系不大,与内核显卡驱动有关,但我也不知道为什么会这样。我从 strace 输出里看到既有 i 卡也有 a 卡(DRIVER=i915 和 DRIVER=radeon),你的显卡及其配置是什么?关掉其中一个试试。

Reply View the author
avatar
duanyao
deepin
2017-07-07 02:17
#14
@jingle 看看?
Reply View the author
avatar
nicot
deepin
2017-07-07 18:17
#15
https://bbs.deepin.org/post/142020
我看到这两次读取有问题,耗时太长了(最后的尖括号里,单位是秒):

确实是双显卡,除了intel自带的还有一个AMD的卡,我试试把AMD的关掉,有没有可能与我是高分屏有关系?
Reply View the author
avatar
duanyao
deepin
2017-07-07 19:52
#16
https://bbs.deepin.org/post/142020
确实是双显卡,除了intel自带的还有一个AMD的卡,我试试把AMD的关掉,有没有可能与我是高分屏有关系? ...

高分屏应该也会有点影响,但我估计不会那么大。具体是多大分辨率?
Reply View the author
avatar
路由器(router)
deepin
2017-07-07 20:48
#17
我的SSD在更新前两秒截图和保存在桌面上,更新后一秒完成所有步骤。
Reply View the author
avatar
nicot
deepin
2017-07-07 21:03
#18
https://bbs.deepin.org/post/142020
高分屏应该也会有点影响,但我估计不会那么大。具体是多大分辨率?

1920 1080,算高分吗,不太了解这个
Reply View the author
avatar
duanyao
deepin
2017-07-07 22:00
#19
https://bbs.deepin.org/post/142020
1920 1080,算高分吗,不太了解这个

对台式机算普通。我的是1366x768,按像素算大约是你的一半,差距应该不至于那么大。我觉得显卡驱动的问题可能性比较大。试着关闭一个显卡,或者试试回退到旧内核(既然你说升级前还没这么慢)。还记得你升级前的内核版本吗?现在最新的内核是 linux-image-4.9.0-deepin6-amd64-unsigned,上一版本是 linux-image-4.9.0-deepin5-amd64-unsigned 。
Reply View the author
avatar
152******88
deepin
2017-09-21 18:58
#20
https://bbs.deepin.org/post/142020
对台式机算普通。我的是1366x768,按像素算大约是你的一半,差距应该不至于那么大。我觉得显卡驱动的问题 ...

我用的是龙芯版的deepin,截图慢正常吗?
real        0m3.767s
user        0m3.184s
sys        0m0.078s
Reply View the author
1 / 2
To page