title: Poor ListView performance on Gluon
body: <p>I have a custom <code>ListCell</code> implementation, shown in the picture below. </p>
  
  <p><a href="https://i.stack.imgur.com/2ccv6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ccv6.png" alt="enter image description here"></a></p>
  
  <p>The left side, which represents the date, consisting of 3 labels, put in a <code>VBox</code> and the "CounterContent" consisting of the counter, with a <code>TextField</code> for each digit, contained in a <code>HBox</code>, and two <code>Hboxes</code> containing labels for kWh, kWh/day and so on. And that seem to be just too much, to be running performantly.</p>
  
  <p>I've tried to load the data in a background task, showing a progress indicator, while the task is running, but unlike on desktop, on android the performance is very poor. Whenever I switch to the listview, the garbage collection kicks in, and blocks the ui thread, so that the progress indicator never shows up.</p>
  
  <p>I've tried it on a Huawei Y-300, Android 4.1.1, javafxports 8.60.6 (because javafxports 8.60.7 causes a bug, that makes <code>TextField</code> unusable), and on a Samsung S5 mini, Android 5+. On the Samsung phone the performance in general is way better, just like expected, because of the Ahead-of-Time compilation I guess, but there is still the garbage collection issue. Furthermore after the listview has been populated with cells, the scrolling is not very smooth.</p>
  
  <p>Is the listcell to complex or what else could be the matter for the poor performance?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>After running a lot of tests it seems the unsmooth scrolling is not caused by performance problems. At least on the S5 (javafxports 8.60.7). </p>
  
  <p>I removed all css styling, and replaced the textfields by a single label (the counter node is already a custom control(forgot about that), which lays out the textfields in 2 <code>Regions</code>(not <code>HBoxes</code>) and the nodes of the <code>ListCell</code> are instantiated in the constructor). Furthermore I switched the <code>ListView</code> for a <code>CharmListView</code> and set android.monocle.input.touchRadius=1.</p>
  
  <p>None of these steps resulted in considerable improvement. </p>
  
  <p>Just to clarify: In contrast to the Huawei phone, the scrolling on the S5 and android 5+ is usable, but it's not very smooth, which makes for a unsatisfactory user experience.</p>
  
  <p>On the Huawei (javafxports 8.60.6), changing the counter textfields for a label, gave a significant improvement, but not to the point where the scrolling became usable. Until I set this magical experimental switch: gluon.experimental.performance=true, which makes the listview scrolling lightning fast(after a little warmup delay), but still not really smooth. </p>