title: RecyclerView with cursor loader is too slow when updating frequently
body: <p>I am fetching podcast feed from the DB and displaying it in the RecyclerView using <strong>LoaderManager.LoaderCallbacks</strong>. In my content provider:</p>
  
  <ol>
  <li>I register an 'Observer' in the content resolver query() method with: <code>cursor.setNotificationUri(getContext().getContentResolver(), uri);</code></li>
  <li>When I update/insert/delete in the content resolver, I notify Observer with: <code>getContext().getContentResolver().notifyChange(uri, null);</code> so <code>onLoaderReset()</code> is triggered when needed</li>
  </ol>
  
  <p>Then I have a service with the <strong>DownloadManager</strong>, that update a progress of my ongoing downloads to the database every second. The loader is constantly loading the data from the DB and I can see the changing progress of every downloading episode in the UI.</p>
  
  <p>I think, this is a wrong approach of notifying a change and is very very slow, but I can't think of any better solution right now. Could you suggest any effective solution with RecyclerView and download progress?</p>
  
  <p>My custom activity with RecyclerView</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MyActivity
      implements LoaderManager.LoaderCallbacks&lt;Cursor&gt; {
  
      private RecyclerView mRecyclerView;
      private MyCustomRecyclerViewAdapter mAdapter;
  
      ...
  
      @Override
      public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
          return new CursorLoader(this,
              myDataUri, null, null, null, null
          );  
      }   
  
      @Override
      public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor data) {
          mAdapter.swapCursor(data);
      }
  
      @Override
      public void onLoaderReset(Loader&lt;Cursor&gt; loader) {
          mAdapter.swapCursor(null);
      }
  
      ...
  }
  </code></pre>
  
  <p>My custom adapter</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MyCustomRecyclerViewAdapter
      extends RecyclerView.Adapter&lt;EpisodeAdapter.AudioAdapterViewHolder&gt; {
  
      ...
  
      public void swapCursor(Cursor newCursor) {
          mCursor = newCursor;
          notifyDataSetChanged();
      }
  
      ... 
  }
  </code></pre>