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

Offline deletion take too long time to remove a downloaded content #756

Closed
nampdn opened this issue Apr 18, 2017 · 9 comments
Closed

Offline deletion take too long time to remove a downloaded content #756

nampdn opened this issue Apr 18, 2017 · 9 comments
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@nampdn
Copy link

nampdn commented Apr 18, 2017

  • What version of Shaka Player are you using?
    2.0.6

    • Can you reproduce the issue with our latest release version?
      Yes
    • Can you reproduce the issue with the latest code from master?
      Yes
  • Are you using the demo app or your own custom app?
    Custom

    • If custom app, can you reproduce the issue using our demo app?
  • What browser and OS are you using?
    Chrome Android, Crosswalk + Ionic + Cordova

  • What did you do?
    Remove downloaded offline file. 18MB of content take ~34 seconds to remove.

    • What content did you load?
      My own content

      • If standard demo asset, which one?

      • If custom asset, what manifest and license server URIs?

    • How did you interact with the content, if at all?

  • What did you expect to happen?
    Immediate or nearly immediate content deletion.

  • What actually happened?
    Deletion take very long time to remove the offline content.

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Apr 25, 2017
@joeyparrish
Copy link
Member

@phamduongnhatnam, can you reproduce this issue:

  1. on desktop Chrome?
  2. on Android Chrome directly without Crosswalk or Cordova?

@nampdn
Copy link
Author

nampdn commented Apr 26, 2017

Yes,

  1. On Chrome desktop:
  • Download 207MB of content then delete it takes 17.49 seconds.
  1. On Cordova with Crosswalk latest (on Chrome Android has a little bit faster):
  • Download the same file with 207MB, it takes 59.4 seconds.

P/s: Sometimes in Cordova (with Crosswalk) delete bigger file would cause the app to crash, I don't know but I think it consumes a lot of memory to delete a file.

@joeyparrish joeyparrish added this to the v2.2.0 milestone Apr 26, 2017
@joeyparrish
Copy link
Member

@phamduongnhatnam, I can't support Cordova or Crosswalk directly, but since you can reproduce slow deletes on desktop Chrome, it should be easy enough for us to look into. Thanks for the report.

@nampdn
Copy link
Author

nampdn commented Apr 26, 2017

@joeyparrish Thanks, I know that cordova/crosswalk is not a main point for us.

@vaage vaage self-assigned this May 1, 2017
@vaage
Copy link
Contributor

vaage commented May 11, 2017

@phamduongnhatnam I was able to improve the delete performance. Please run this through your benchmarking and let us know if it meets your expectations.

joeyparrish pushed a commit that referenced this issue May 15, 2017
After looking into the speeds for removing data from IndexedDB, it was
found that using a cursor was slower than the other methods. This change
takes the remove logic and changes it to remove each key as part of
one transaction.

Closes #756

Change-Id: Iec3916650d8a4fe2b6353b604c070d8a0af7426c
@joeyparrish
Copy link
Member

This fix was just released in v2.1.2.

@nampdn
Copy link
Author

nampdn commented May 23, 2017

@joeyparrish Once again your work is awesome!

@joeyparrish
Copy link
Member

I'm just the messenger! Thanks belong to @vaage for this one.

@nampdn
Copy link
Author

nampdn commented May 24, 2017

@vaage I did the benchmark again and it takes about 10 seconds to remove 1GB content in Chrome Desktop. The performance in Cordova+Crosswalk also improved. Thanks and congrats!

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants