Determine whether we should drop dependency on ByteStreams
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
We purposefully avoided com.google.io for Android, which is why IoUtils existed. I'm not sure if anything there has changed, but #5834 started using com.google.io. ByteStreams pulls in a bit more code that would initially be expected and maintaining IoUtils was trivial. There is some potential performance gains (memory usage and CPU) to be had by ByteStreams, because it uses shards that are combined at the end vs one contiguous chunk of ByteArrayInputStream.
From #5834 we see that using ByteStreams added .5K and 14 methods. That's not much, but simultaneously seems a bit much for limited gain.
This came up as ByteStreams.toByteArray was noticed by a Google-internal Android checker for some related code. (cl/272629838)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando #5834 e gli utilizzi di ByteStreams.toByteArray insieme a IoUtils nel codice relativo ad Android. Confronta la dimensione del codice aggiunto e i metodi con i potenziali vantaggi in termini di memoria e CPU descritti qui. Il lavoro è completato quando viene registrata una decisione motivata sull'opportunità di rimuovere la dipendenza da ByteStreams.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- mobile
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100