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

extremely slow performance on upload #7

Open
DirtyNightmare opened this issue Aug 15, 2016 · 0 comments
Open

extremely slow performance on upload #7

DirtyNightmare opened this issue Aug 15, 2016 · 0 comments

Comments

@DirtyNightmare
Copy link

DirtyNightmare commented Aug 15, 2016

so i tryed to copy a picture with jcifs to my smb shared folder and it took me 4h for 100kb picture i then tryed with es files and there it was instanlty
here is my code

protected String doInBackground(String... params) {

            File file = new File(filestocopy);
            String filename = file.getName();

            NtlmPasswordAuthentication auth1 = new NtlmPasswordAuthentication(
                    servername, username, password);

            try {

                SmbFile sfile = new SmbFile(servername + "/" + filename, auth1);
                if (!sfile.exists())
                    sfile.createNewFile();
                sfile.connect();

                InputStream in = new FileInputStream(file);

                SmbFileOutputStream sfos = new SmbFileOutputStream(sfile);

                byte[] buf = new byte[1024];
                int len;
                while ((len = in.read(buf)) > 0) {
                    sfos.write(buf, 0, len);
                }
                in.close();
                sfos.close();
@DirtyNightmare DirtyNightmare changed the title ekstremly slow performance ekstremly slow performance to being usefull Aug 15, 2016
@DirtyNightmare DirtyNightmare changed the title ekstremly slow performance to being usefull ekstremly slow performance Aug 15, 2016
@DirtyNightmare DirtyNightmare changed the title ekstremly slow performance extremely slow performance on upload Aug 15, 2016
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

1 participant