zoukankan      html  css  js  c++  java
  • WPF : 性能调整

    1. 2D Graphics and Imaging
      1. 尽量使用Drawing来代替Shape. 因为Drawing不用支持Layout和Event
      2. 尽量使用DrawingVisual来绘制背景等不需要Layout和Event的地方
      3. 使用图形时, 尽量decode到最小的size
      4. 在动画时, 调用RenderOptions.SetBitmapScalingMode()把图片设置到LowQuality
      5. 缓存Brush.
        // Set the minimum and maximum relative sizes for regenerating the tiled brush. RenderOptions.SetCacheInvalidationThresholdMinimum(drawingBrush, 0.5); RenderOptions.SetCacheInvalidationThresholdMaximum(drawingBrush, 2.0); // The tiled brush will be regenerated when the size is // 0.5x, 0.25x (and so forth) // and // 2x, 4x, 8x (and so forth) // of the original size. // Set the caching hint option for the brush. RenderOptions.SetCachingHint(drawingBrush, CachingHint.Cache);
  • 相关阅读:
    PerfDog
    adb 常用操作
    netstat命令(net-tools)
    资源路径总结:
    四个作用域对象:
    jsp的 九大内置对象
    Jsp 的语法和指令
    JSP 学习
    server.xml 文件:
    Web.xml 文件使用总结:
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1572486.html
Copyright © 2011-2022 走看看