Comments (23)
Hey, do you mind if we keep this open? The data binding PR does not solve the issue. I will be contributing more to help reduce the overall startup time.
from vancedmanager.
Feel free to contribute, but please try to open PR on dev branch instead of master
from vancedmanager.
@X1nto Have you add a check to avoid multiple downloads of the same package (vanced or microg), after pressing the download button again?
No, it's easier to redownload because sometimes downloaded package may be corrupted and to avoid this we redownload again. I don't see any issues here because 1. Wifi is unlimited 2. Who will download using mobile data?
from vancedmanager.
This is an example (this time there were no forced closings). 1 minute of stuck:
from vancedmanager.
We can fetch them after entering the HomeFragment. Internet speed shouldn't really be a reason for crash.
from vancedmanager.
@X1nto I checked the commit and it looks great. However, your model class still fetches each item by itself which technically isn't the responsibility of a Model
. Fetching should be done by a Repository
. This can be changed by making a Data Class. I can link you to some examples if you want or I'll just make a PR as soon as I get time from college and work.
from vancedmanager.
I'll definitely try and make a PR to the app if you guys are accepting contributions.
from vancedmanager.
We do accept PRs, preferably to Dev as that's the working branch, master is for release ready code
from vancedmanager.
Sure 👍
from vancedmanager.
Well, sure. I don't really think that app loads all fragments on start, but I can't deny it either because I don't know how navigation libs work. Feel free to make a PR whenever you find a way to improve app
from vancedmanager.
@X1nto Yeah fragments may not be an issue at all but the app is still doing a lot of processing at startup. I'll try and look at other parts that may be causing an issue. Also, stuff like switching between root and non-root mode increases the load on the main thread, I think some of that work can be pushed over to the background thread for a better UX.
from vancedmanager.
Hmm, might be issue with loading data from the server, but as far as I know getjson library uses AsyncTask to load data, so it should be fine. Switching from root and nonroot just recreates activity with overridePendingTransition
, so the issue should be with home fragment I guess, or it's viewmodel
from vancedmanager.
@X1nto Have you add a check to avoid multiple downloads of the same package (vanced or microg), after pressing the download button again?
from vancedmanager.
However I think that I have understand why the app stuck on the splashscreen at startup, and concerns the optimizations mentioned by skrilltrax: with slow network there are difficulties in contacting the server, and after a while the app forcely closed.
If will be happen again I will try to make a video.
from vancedmanager.
However I think I understand why the app stuck on the splashscreen at startup, and concerns the optimizations mentioned by skrilltrax: with slow network there are difficulties in contacting the server, and after a while the app forcely closed.
If will be happen again I will try to make a video.
I don't see a reason why slow internet would slow down app loading speed. You don't need a good internet to load data from server, you need at least 10kbps and I'm pretty sure you have much better connection than this
from vancedmanager.
To simplify your tests set your cellular data to edge (2g), open app and wait three seconds before totally disable cellular data. With this approach you can also trigger a FC 😁
from vancedmanager.
To simplify your tests set your cellular data to edge (2g), open app and wait three seconds before totally disable cellular data. With this approach you can also trigger a FC 😁
That's not something I can fix, here's a explanation:
When you start app, it's on splash screen until app loads all the required data for it to show layout, when you have a slow connection, it takes a very long time to load data, Android sees that application shows a blank splash screen for more than 10 seconds and just kills app.
Solution: upgrade your network speed
from vancedmanager.
@X1nto
To simplify your tests set your cellular data to edge (2g), open app and wait three seconds before totally disable cellular data. With this approach you can also trigger a FC grin
https://streamable.com/4o7slnThat's not something I can fix, here's a explanation:
When you start app, it's on splash screen until app loads all the required data for it to show layout, when you have a slow connection, it takes a very long time to load data, Android sees that application shows a blank splash screen for more than 10 seconds and just kills app.
Solution: upgrade your network speed
Maybe you can implement a minimum timelapse (3 seconds?), before showing a window of download failed due to slow connection, and maybe add another one when the connection is totally lost (to avoid crash).
from vancedmanager.
@X1nto I think that can be fixed. The only data that needs to fetched from the server are changelogs. That can be lazily fetched whenever the user requests it. This will help in implementing a No Internet state in the app and will reduce the number of crashes that people experience.
from vancedmanager.
@X1nto I think that can be fixed. The only data that needs to fetched from the server are changelogs. That can be lazily fetched whenever the user requests it. This will help in implementing a No Internet state in the app and will reduce the number of crashes that people experience.
Hmm, app loads latest versions too, not only changelogs. These are loaded in HomeViewModel
from vancedmanager.
Just pushed new commits which fetch Json data asynchronously, without blocking the UI thread. This should fix the issue with splash screen getting stuck for some users with slow internet. e9c3e7a
from vancedmanager.
@X1nto That's great. I was working on something similar but couldn't complete it. Another improvement that I would like to suggest would be using a Model class with retrofit to fetch all the data as a single object rather than fetching each item separately.
from vancedmanager.
@Skrilltrax Added model class in b1e0db8 and honestly, I should've done it earlier. Fetching stuff is much easier now and doesn't require declaring thousand different variables
from vancedmanager.
Related Issues (20)
- [Bug]: Post audio FX bugs HOT 1
- [Feature]: WebADB for installation on abuseOS
- [Feature]: Expanding the not up-to-date apps
- [Bug]:
- [Feature]: add this app manager to fdroid HOT 2
- [Bug]: App window stuck after maximizing HOT 2
- [Bug]: Vanced Manager refuses to show install button HOT 1
- [Bug]: Changelog cut off
- [Bug]: Update Manager not finding new updates HOT 5
- YouTube Vanced - skip verification age HOT 2
- Skip segments HOT 1
- [Bug]: Video won't load
- [Bug]: install error
- Vanced HOT 1
- [Bug]: HOT 1
- [Bug]: after landscaping view can't back to portrait the video HOT 1
- [Bug]: Crash YouTube Vanced HOT 2
- [Bug]: Can't install YT Music
- Youtube short story video quality getting drop HOT 1
- Someone share the final Vanced MicroG and Youtube Vanced apk that is installed by Vanced Manager HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vancedmanager.