Results 1 to 3 of 3

Thread: CPU Usage

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    6

    CPU Usage

    I am working with IMX 35 board and I am drawing around 400 lines on it. What should be the range of CPU usage in the best and worst case scenario using an OPEN VG implementation. And are there any optimizations I can perform to reduce the same.

    Thanks,
    John

  2. #2
    Senior Member
    Join Date
    Feb 2006
    Posts
    115

    Re: CPU Usage

    I don't know the amount.
    I do know it will probably depend greatly on a whole bunch of factors including:
    - line width
    - join styles
    - cap styles (especially if dashing is enabled)
    - number of line intersections
    - number of segments inside the path(s)
    - blending modes
    - anti-aliasing
    etc.

    In general, to speed things up:
    - once you set path data to a path, try to never change the data. Use matrix transformations whenever possible instead.
    - turn the blending to SRC instead of SRC_OVR (default) if you're not using any alpha.
    - turning off anti-aliasing may help (at the cost of visual quality)
    - turn off cap styles to BUTT and join styles to BEVEL (though some implementations might be faster with ROUND - experiment)
    - thinner lines cover less pixels == faster.
    - Do not submit massive paths for drawing (e.g. 400 line segments in a single path). The more segments there are in a path, the more complicated the intersection tests are which prevent overdraw. These intersection tests are done by the driver but can be quite expensive. It's sometimes better to submit 40 paths containing 10 segments each than 1 path containing 400 segments (especially for stroke paths).
    - in general solid color is faster than linear color is faster than radial color. Texturing falls somewhere in between depending on hardware.
    - don't draw lines which to not appear on the screen. It still needs processing.
    - Lines are faster than Quads, Quads faster than Cubics.
    - Check to see if your path data simplifies any. Input geometry is, more often than not, sub-optimal.

    Good luck.

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    6

    Re: CPU Usage

    Hey,

    Thanks a lot Ivo for such a detailed answer. I will try to incorporate as many suggestions as you have made. I really appreciate your help in this regard.

    Thanks
    John

Similar Threads

  1. when run on cpu or graphics card of cpu
    By prince in forum OpenCL
    Replies: 2
    Last Post: 01-20-2013, 07:35 AM
  2. CPU Usage 200%
    By yiuin98 in forum OpenCL
    Replies: 1
    Last Post: 08-09-2011, 11:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •