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

question about main thread issue #12

Closed
fukemy opened this issue Apr 13, 2021 · 2 comments
Closed

question about main thread issue #12

fukemy opened this issue Apr 13, 2021 · 2 comments

Comments

@fukemy
Copy link

fukemy commented Apr 13, 2021

hi, i see you using stream in FileUtils

public static byte[] fileToBytes(File file) {
        int size = (int) file.length();
        byte[] bytes = new byte[size];
        try {
            BufferedInputStream buf = new BufferedInputStream(new FileInputStream(file));
            buf.read(bytes, 0, bytes.length);
            buf.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return bytes;
    }

i want to ask if I using url from network, and my recyclerview have many voice, so did it block main thread and cause delay? Thanks

@cergo123
Copy link
Owner

cergo123 commented Nov 5, 2021

Please try with the last version, this should be fixed now

@cergo123 cergo123 closed this as completed Nov 5, 2021
@fukemy
Copy link
Author

fukemy commented Nov 6, 2021

Thanks for your update

i saw you using asynctask to get media data, but i know asynctask is deprecated now, it's also have max threadpool , so i user have to load many media data at once time, does it work normally? Thanks

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

No branches or pull requests

2 participants