-
Notifications
You must be signed in to change notification settings - Fork 74
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
Abysmal performance on basic commands involving nixpkgs #374
Comments
The evaluation speed (in a proot at least) is very slow. Once a specific version of nixpkgs has been evaluation cached then things get a lot faster. Running just |
taking hours to eval makes this basically unusable 🤷 |
Running |
I feel like this is missing the point - if eval takes over an hour with no guarantee of completion whenever the revision needs updating, I'd have to sit there waiting and hoping it ever completes. There's obviously a design flaw and I'd hope it can be addressed. Or at least, part of the social contract of using open-source software is reporting issues as they are encountered, if no one has done so prior. |
OK, my stance on this.
|
Apologies, I misread the comment here: https://wiki.termux.com/wiki/PRoot
8 min is quite reasonable and closer to what I'd expect on a phone. If I can get it there I'd be happy with that.
Battery saver is off, and "allow background usage" is on. Though, I'd be surprised if doze mode was involved for a foreground app while the screen is on? Also, I think the link provided is outdated, as I don't see any option for "battery optimization" as mentioned in https://dontkillmyapp.com/google FWIW I use a Pixel 7 with the current (June) release of android 14. Other helpful info might be that, the initial bootstrap of nix-on-droid takes about 3 min. I'll run the |
Initial bootstrap definitely involves more than eval'ing a hello, so something is killing the performance afterwards. IDK whether an app can run out of Doze credits while being in foreground, but try (quoting from same device):
|
I'm not super knowledgeable about Nix yet, but I'll try to provide useful and relevant information, let me know if I miss anything and I'll follow up with that info. Device Info + App infoI'm using a Pixel 5 on LineageOS 21, rooted with KernelSU (probably irrelevant but thought I should mention just in case). The app's battery restriction setting thing is set to Unrestricted and I always acquire a wakelock via the notification when using it. I'm running it with the screen on, app in the foreground, and charger plugged in. Of course that's not how I always use it, but for right now, since I've been configuring things while switching over from Termux, this is how I've been using it I didn't time it perfectly, but seem to have encountered the same behavior as the person who created this issue. SIGINT did not work for me either, I assume since it was waiting on IO or something along those lines? However, I wanted to add that I don't experience the problem anymore now that I've copied over my dotfiles from my PC. Here is the (I think) relevant part of my config: nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [
{nix.registry.nixpkgs.flake = nixpkgs;}
...
];
}; I put
Basically this comment is a "I also experience this issue, here's the config that seemingly makes the issue disappear", and hopefully the info helps. Again, let me know if I should add any more details. |
@Arian04 Could you time the commands from #374 (comment) and post more objective results? |
TL;DR: I timed those commands with my current config, then commented out the lines that I felt had "fixed" the issue, then switch'd into the new config, then re-timed those commands, and got perfectly reasonable results both times, so sorry about the noise. Either I was super impatient before and interpreted the times as like 5x longer than they were, or I'm just no longer able to reproduce the issue :( Testing detailsTesting with current config
Testing with modified config
|
I noticed the option got moved around a bit in an Android update. you can find it if you click on the preference item itself, but not the toggle switch on the right. so basically click around where the actual "Allow background usage" text is, and it'll show you the submenu "underneath" it, if that makes sense |
This comment was marked as resolved.
This comment was marked as resolved.
I have a question why can't NIX_PATH can't be generated |
Commands like
or
gets stuck for tens of minutes (!) after unzipping, sometimes never completing. SIGINT does nothing, have to force stop the app.
The text was updated successfully, but these errors were encountered: