oceanbit / GitShark

🦈 A Git client to surf through your repos on mobile
https://gitshark.dev
Mozilla Public License 2.0
136 stars 9 forks source link

Crash on switch branch #59

Closed crutchcorn closed 3 years ago

crutchcorn commented 3 years ago

Reproduction steps:

Device: Samsung Tab S7

crutchcorn commented 3 years ago

Discarding said item causes a crash on it's own

crutchcorn commented 3 years ago

This is due to an OOM problem

image

It occurs when trying to readFile the packfile from Unicorn Utterances - which is above 30MB (much higher). This is a relatively medium-sized repo, and therefore we should port code to use JGit instead to switch files/etc

crutchcorn commented 3 years ago

Confirmed that this is an OOM issue as I cloned the much smaller unicorn-utterances/batteries-not-included and managed to both change branches and discard items without running into any bugs

crutchcorn commented 3 years ago

I've managed to fix the OOM issue while discarding file changes thanks to:

089fa2e68d160de7400fa46f92749ed050f04969

I'm currently working on fixing the change branch code

crutchcorn commented 3 years ago

Fixed by: 51d2eeed0aa30f74f88b60c4531be16eb73e94e1