Skip to content
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

Slow local search #10

Open
Midako opened this issue May 20, 2014 · 4 comments
Open

Slow local search #10

Midako opened this issue May 20, 2014 · 4 comments

Comments

@Midako
Copy link

Midako commented May 20, 2014

Hey Max,
it looks like the search for the local function is really slow,
maybe it is some problem of me or do you know why ?
im using youtupi on a Raspberry pi Rev B with 512 MB Ram
when im using the normal function "find path | grep Name (with pattern)"
its much faster or the php script i did write until i did see ur programm...
maybe u know a answer for this

Thank You

@Midako
Copy link
Author

Midako commented May 20, 2014

Starting directory is the same

@kktuax
Copy link
Owner

kktuax commented May 21, 2014

Search is performed by looking into every sub-directory so you are right it's probably not the fastest way. Also no caching is performed so the filesystem has to be accessed on every query.

You can probably improve the performance if you limit your search to a the directory where your media is, with a configuration like:

{
    "local-folders": [
        "~/Media", "~/Downloads"
    ],
    "download-folder": "~/Downloads"
}

If you have programming skills maybe you can improve the find_files function from: https://github.com/kktuax/youtupi/blob/master/youtupi/modules/local.py

@Midako
Copy link
Author

Midako commented May 22, 2014

never did write in python ^-^ i did set the config for local folders on
/media/dir/dir
at the end of the dir are 2 dirs without sub dirs and then there are one dir with few sub dirs something about 47GB
i will look if it works faster if i just use one dir with no sub dirs
im using a external hdd for medias its mounted
but even if i just use the one folder for search it needs long
450~ GB is in the one folder so maybe python is'nt that fast...but i think not its python self more how he search maybe :S

Tested with:
450GB - Slow
3,5
GB - Faster but somehow slow instead of my PHP script
45GB - Faster then 450 but even slow....
maybe you should use the function glob for python, looks like the same as PHP

@Midako
Copy link
Author

Midako commented Jun 27, 2014

did u found already something ?

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

No branches or pull requests

2 participants