Commit graph

1713 commits

Author SHA1 Message Date
Philipp Jahoda
6d21817c8a Rename PointD to MPPointD 2016-07-02 12:36:16 +02:00
Philipp Jahoda
43fa1e6cec Merge 2016-07-02 12:29:50 +02:00
Tony Patino
40c5c87d13 Perf + Bug () ()
This changeset merges all performance updates related to , as well as the bug fix for  for master.
2016-07-01 13:53:51 -07:00
Tony Patino
b5da8dcdb5 Crash fix - Create small clip paths ()
With large data sets, the Path object created was sufficiently large as to cause an OutOfMemory error. This is resolved by only pathing a limited number of points on the chart at a time, then clearing the path and resuming. Stress testing with 1500 entries.
2016-07-01 13:19:37 -07:00
Tony Patino
87758604d3 Revert "Crash fix - Create small clip paths ()"
This reverts commit d5df3ad795.
2016-07-01 13:17:49 -07:00
Tony Patino
d5df3ad795 Crash fix - Create small clip paths ()
With large data sets, the Path object created was sufficiently large as to cause an OutOfMemory error.  This is resolved by only pathing a limited number of points on the chart at a time, then clearing the path and resuming.  Stress testing with 1500 entries.
2016-07-01 13:16:22 -07:00
Philipp Jahoda
0789628197 Add realm related example code 2016-07-01 18:54:59 +02:00
Philipp Jahoda
6a2e6e5528 Temporary remove of realm from example 2016-07-01 18:12:42 +02:00
Philipp Jahoda
0597663392 changes to build.gradle 2016-07-01 17:49:12 +02:00
Philipp Jahoda
efbea0a7ef Documentation 2016-07-01 17:30:12 +02:00
Philipp Jahoda
12eee703a7 Fix issue related to highlight callbacks 2016-07-01 09:13:58 +02:00
Tony Patino
523c7e5b21 Render bug fix - circle bitmap sizes ()
Zooming in on the circle bitmaps, they were slightly small.  Allocate a little more space in the circle's bitmap to correct this.
2016-06-30 17:24:32 -07:00
Tony Patino
66094db764 Eliminate allocs - Copy arrays without new[] ()
Make sure we copy List<> into [] if the size is identical to the length, instead of instantiating a new [].
2016-06-30 16:28:15 -07:00
Tony Patino
37f2498487 Eliminate allocs - MFPoint recycle ()
Noticed a couple of stray un-recycled MFPoint and FSize instances.  These accounted for a bit of the remaining generated garbage.
2016-06-30 16:26:53 -07:00
Tony Patino
38fbefe66b Eliminate allocs - Move and Zoom Job Pools ()
Create object pools for the Zoom, move, and animation jobs.  Their constructors remain public, to make this easier to roll back from if needed.
2016-06-30 15:33:02 -07:00
Tony Patino
5a18d0ef22 Eliminate allocs - Adjust pool replenishing ()
Replenish fewer objects in utils pools when empty, in case the pool size grows large.
2016-06-30 15:30:45 -07:00
Tony Patino
b037f55d73 Eliminate allocs - XAxisRender array ()
Found an array that was instantiated frequently without need.  Placed bounds on its instantiation.
2016-06-30 15:29:40 -07:00
Tony Patino
afdbd2c5f0 Eliminate allocs - Tests for StringCache ()
Created unit tests for the FormattedStringCache classes.  Also, took this opportunity to create a FormattedStringCache.Generic<K,V> static class to take over what was previously simply FormattedStringCache.  Verified that all unit tests still pass.
2016-06-30 11:30:39 -07:00
Tony Patino
69f17b2a79 Eliminate allocs - Buffer ArrayLists ()
Many short-lived ArrayLists were created in various methods, which could easily have been extracted to field level variable.  This has been done, and the arrays cleared before use.
2016-06-29 18:30:21 -07:00
Tony Patino
7fd18d2177 Eliminate allocs - Buffer Paint.FontMetrics ()
paint.getFontMetrics() has a hidden allocation.  paint.getFontMetrics(fontMetrics) is used internally inside of Paint, so caching and holding onto a metrics buffer helps reduce allocations.
2016-06-29 17:48:31 -07:00
Tony Patino
424ee02ce2 Eliminate allocs - String Caches now have Prim subtypes ()
By creating versions of the FormattedStringCache that don't require auto boxing, allocations are cut tremendously in this commit.
2016-06-29 17:36:15 -07:00
Tony Patino
a04ad28cec Eliminate allocs - Cache XBounds in Renderer ()
getXBounds creates a disposable XBounds instance on every call.  Cache it and update the values with a set method.  This means XBounds values are now mutable.
2016-06-29 17:12:47 -07:00
Tony Patino
d372fd305c Eliminate allocs - Rect and RectF buffers ()
Buffering temporary Rect and RectF instances.  Created methods to modify RectF instances as performance alternatives to methods that create disposable RectF instances.
2016-06-29 17:05:07 -07:00
Tony Patino
0b72b5588b Eliminate allocs - Cache formatted Strings ()
ValueFormatter objects now rely on a FormattedStringCache to return already-formatted Strings.  We might want to create primitive-enabled versions since all our values to format are float or double primitives, and the keys are also all primitives.  This will eliminate auto-boxing penalties.
2016-06-29 16:43:33 -07:00
Tony Patino
bd45d73bc6 Eliminate allocs - Array Access ()
foreach(:) arrays on Android carry the cost that each iteration creates an implicit instantiation.  for(;;) arrays are uglier but guarantee that no unwanted allocations occur while iterating.
2016-06-28 18:18:49 -07:00
Tony Patino
c59b46affc Eliminate allocs - Cache drawn circles as bitmaps ()
LineChartRenderer now caches drawn circles as bitmaps.  ILineDataSet now has a method that returns the number of available colors in the set.
2016-06-28 17:39:42 -07:00
Tony Patino
56cfd2b42b Eliminate allocs - Matrix and Path buffers ()
Created buffers for short lived Matrix and Path objects, resetting them instead of instantiating new ones.  Also created some matrix transform methods that accept output Matrix objects to facilitate caching.
2016-06-28 17:22:48 -07:00
Tony Patino
d946f3e3ff Eliminate allocs - float array buffers ()
Creating field level buffers for frequently instantiated float arrays.  Cuts instantiations of many small objects.
2016-06-28 16:34:49 -07:00
Tony Patino
f86c1632a7 Eliminate allocs - MPPointF replace PointF ()
In order to have a poolable alternative to PointF, this changeset introduces MPPointF.  Convenience methods exist that accept output MPPointF variables for extra savings on pool access.  Methods that return recyclable MPPointF instances are documented.
2016-06-28 15:48:48 -07:00
Tony Patino
0f2e2133d3 Eliminate allocs - Legend arrays ()
In addition to creating a resized label sizes array, copy old FSize instances to the new array to cut down on the need to get instances from pool.  Recycle to pool if the labels shrank.
2016-06-28 14:48:57 -07:00
Tony Patino
fcf26aa6ad Eliminate allocs - PointD pooling ()
Replace all "new PointD()" instantiations with PointD.getInstance() / PointD.recycleInstance() pairs. Helper methods overloaded to include void return / output PointD variable signatures.  Old methods remain as convenience, with notations that they return recyclable instances.
2016-06-28 14:26:27 -07:00
Tony Patino
d299546ebd Eliminate allocs - FSize pooling ()
Replace all "new FSize()" instantiations with FSize.getInstance() / FSize.recycleInstance() pairs.  Smarter FSize array usage inside Legend.
2016-06-28 13:54:10 -07:00
Tony Patino
cb6dabbdec Eliminate allocs - ObjectPool and Tests () 2016-06-28 12:42:05 -07:00
Philipp Jahoda
a233e38978 Remove Realm related classes from project 2016-06-27 23:47:32 +02:00
Philipp Jahoda
da6ded7bce Merge master 2016-06-27 17:21:41 +02:00
Philipp Jahoda
f54631175e Update README.md 2016-06-27 17:20:50 +02:00
Philipp Jahoda
1b4e9be07f Code cleanup and documentation 2016-06-27 12:34:23 +02:00
Philipp Jahoda
bd5858e8c0 Changes to custom scatter rendering 2016-06-27 12:29:49 +02:00
Philipp Jahoda
af114d180d Merge master 2016-06-26 22:04:19 +02:00
Philipp Jahoda
0f3f4b75b0 Merge 2016-06-26 21:58:12 +02:00
Philipp Jahoda
f01b90668b Work on horizontalbarchart 2016-06-26 21:05:41 +02:00
Philipp Jahoda
eb76d21fe0 Cleanup 2016-06-26 11:54:43 +02:00
Philipp Jahoda
c5fa68eda5 Merge master 2016-06-26 10:31:13 +02:00
Philipp Jahoda
98e090ca19 Minor example adjustments 2016-06-26 10:30:16 +02:00
Philipp Jahoda
3b0be740cd Add example for half-piechart 2016-06-26 10:05:54 +02:00
Philipp Jahoda
b5bfc3e2bd Fixes related to setting visible axis range for horizontal barchart 2016-06-26 00:24:19 +02:00
Philipp Jahoda
f345d164ce Fix issue related to horizontal dashed grid lines 2016-06-25 11:00:29 +02:00
Philipp Jahoda
5f8eb44d9f Fixes related to highlight rendering 2016-06-24 23:10:03 +02:00
Philipp Jahoda
0eb69d246c Changes related to highlight full bar 2016-06-24 23:01:05 +02:00
Philipp Jahoda
cb0226b231 Update CONTRIBUTING.md 2016-06-23 15:11:19 +02:00