title: Why NotificationManager works so slow during the update progress?
body: <p>I publish file upload progress via NotificationManager, but while updating its progress UI freezes.</p>
  
  <p>I use NotificationCompat.Builder, which cached in the class field. So progress publishing is a very simple:</p>
  
  <pre><code>manager.notify(id, uploader.
      setProgress(MAX_PROGRESS, (int) (progress * 100), false).
      build()
  );
  </code></pre>
  
  <p>Update progress is guaranteed to execute from the main thread(wrapped in Handler decorator).</p>
  
  <pre><code>this.request.setCallback(new UploaderDecorator(this.request.getCallback()));
  </code></pre>
  
  <p>The very publication of progress is as follows:</p>
  
  <pre><code>long total = file.length();
  long uploaded = 0;
  int bytesRead = input.read(buffer, 0, bufferSize);
  while (bytesRead &gt; 0) {
      output.write(buffer, 0, bufferSize);
      uploaded += bytesRead;
      callback.onUploadProgress(activeFile, ((float) uploaded / total));
      bytesRead = input.read(buffer, 0, bufferSize);
  }
  </code></pre>
  
  <p>So why it's works so slow?</p>