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

Performance improvements #80

Merged
merged 26 commits into from
Mar 19, 2019
Merged

Performance improvements #80

merged 26 commits into from
Mar 19, 2019

Commits on Jan 8, 2019

  1. Use a BitSet instead of a nested arrays

    Depending on the width of the image a lot of int[] have been created, a BitSet with a size of width * height is a better choice here. It uses less memory and is faster than determinating a pixels transparency each time.
    joerg1985 committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    145f771 View commit details
    Browse the repository at this point in the history
  2. Avoid creation of thousands Point objects and a HashSet

    Create a copy of the original raster to do the shouldPad test and instant update the raster. This avoids a lot of object creation, hash calculation and garbage collection needed to maintain the HashSet.
    joerg1985 committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    258f0dc View commit details
    Browse the repository at this point in the history
  3. Moved the boundary check outside the loop

    It is more efficent to check the boudings outside the loop
    joerg1985 committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    4e882d9 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2019

  1. the BitSet supports clone

    should be a little faster
    joerg1985 committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    bc06074 View commit details
    Browse the repository at this point in the history
  2. Find collisions faster using a fast path

    we expect the none transparent pixel to be around the center.
    we check a 5 * 5 raster first to move faster to the center.
    after this we still check all pixels to get a complete result.
    joerg1985 committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    35dd968 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2019

  1. fixed index calculation

    joerg1985 committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    de13bce View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2019

  1. addes CollisionRaster.lineIsTransparent to improved padding

    if padding is used there are a lot of transparent lines
    joerg1985 committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    e0c4372 View commit details
    Browse the repository at this point in the history
  2. optimzied the fast path of collide

    joerg1985 committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    37d2933 View commit details
    Browse the repository at this point in the history
  3. the background masks all none usable pixels and we can only check thi…

    …s raster
    joerg1985 committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    7e38a54 View commit details
    Browse the repository at this point in the history
  4. ensure the word is inside the background

    joerg1985 committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    9da2642 View commit details
    Browse the repository at this point in the history
  5. implemented the circle background

    joerg1985 committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    ce86d0a View commit details
    Browse the repository at this point in the history
  6. fixed the rectange collision mode

    joerg1985 committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    a5cd279 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2019

  1. Configuration menu
    Copy the full SHA
    18651c7 View commit details
    Browse the repository at this point in the history
  2. render the rotated text into the buffered image

    this improves the image quality and removes intermediate step
    joerg1985 committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    a82dd6b View commit details
    Browse the repository at this point in the history
  3. Delete w1547484505484.png

    sorry, commited a tmp image
    joerg1985 committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    608f7c6 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2019

  1. reverted concurrent creation of words

    the concurrent creation of words could break client code
    joerg1985 committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    ec2e061 View commit details
    Browse the repository at this point in the history
  2. fix to issue #60

    the graphics object used to create the font metrics had other RenderingHints than the graphics object to write the text, if the default values of the used jvm did not have the TEXT_ANTIALIASING set to TEXT_ANTIALIAS_LCD_HRGB.
    joerg1985 committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    2071d17 View commit details
    Browse the repository at this point in the history
  3. added tests and fixed small issues

    joerg1985 committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    534fa04 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2019

  1. mask pixels outside the given image

    joerg1985 committed Jan 19, 2019
    Configuration menu
    Copy the full SHA
    5a785b8 View commit details
    Browse the repository at this point in the history
  2. improved speed of padding with large paddings

    joerg1985 committed Jan 19, 2019
    Configuration menu
    Copy the full SHA
    faf2310 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2019

  1. fixed the mask of the background

    joerg1985 committed Jan 26, 2019
    Configuration menu
    Copy the full SHA
    56c6f86 View commit details
    Browse the repository at this point in the history
  2. use BitSet.nextSetBit to find collisions

    joerg1985 committed Jan 26, 2019
    Configuration menu
    Copy the full SHA
    fd08fc7 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2019

  1. fixed mask of background

    joerg1985 committed Jan 31, 2019
    Configuration menu
    Copy the full SHA
    1ca095b View commit details
    Browse the repository at this point in the history
  2. fixed the calculation of the maximum spiral radius and added a test t…

    …o it
    
    the maximum spiral radius might be bigger or smaller than the image width, e.g. if the image height is bigger than the width.
    joerg1985 committed Jan 31, 2019
    Configuration menu
    Copy the full SHA
    ee9ad38 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2019

  1. don't try to place a word on the same position twice

    this happened when the offset was 0
    joerg1985 committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    c7422cf View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2019

  1. store the theta of the word

    joerg1985 committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    f79d513 View commit details
    Browse the repository at this point in the history