Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Debian Packaging detection too slow #51

Open
tuxpoldo opened this issue Sep 3, 2014 · 3 comments
Open

Debian Packaging detection too slow #51

tuxpoldo opened this issue Sep 3, 2014 · 3 comments

Comments

@tuxpoldo
Copy link
Contributor

tuxpoldo commented Sep 3, 2014

Reported by [email protected]

Hello Leo, Mark!

I'm using bt-sync in ubuntu you're build as PPA. Thank you for your work.
But I've mentioned that daemon started too slow on my laptop (HDD, encrypted partition - slow IO).
I've checked up the source and found that you were using dpkg -S to find what package contains file and later checks if it was btsync-user.
dpkg -S btsyncindicator.py works too slow, it has to process lots of data to make answer. You only want to know if btsync-user is installed.
I advice you to check dpkg -s btsync-user (lowercased "s") - it returns 0 exit code if package is installed, nonzero otherwise. Ant works 100 times faster on my system.

@marxjohnson
Copy link
Owner

The current check_btsync_user method doesn't just check whether btsync-user is installed, but also that the script itself came from the btsync-user package. The proposed solution would mean that if you've got btsync-user installed, you couldn't, for example run a standalone version of btsync and a seperate instance of the script for testing, since the script would always see and use the btsync-user scripts.

Do you think that losing this use case is going to be a problem, or is it worth the trade-off for the better performance?

@tuxpoldo
Copy link
Contributor Author

tuxpoldo commented Sep 5, 2014

I would suggest: make the change, but leave the old code commented. If nobody complains, after one year it shows that the use case is not really relevant.

@marxjohnson
Copy link
Owner

As it's in Git I've just removed it rather than commenting it out, the commit can be reverted down the road if needed.

Can you test it out and check that it works as expected?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants