[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Idea for the new kio
From:       Stephan Kulow <coolo () kde ! org>
Date:       2000-01-30 12:54:37
[Download RAW message or body]

David Faure wrote:
> 
> The problem
> ===========
> If you look at CopyJob in the make_it_cool branch, you'll realise
> that it's getting awful. Recursive copy is already a complex algorithm,
> but implementing it with a state machine, and all in the app's process
> really sucks. For every dir created (and every file copied) a job has
> to be created, scheduled, associated with a slave, started, and then completed.
> 
> The algorithm used to be sequential : list, do some checks, create
> subdirs (show the rename dlg if something already exists), copy the files.
> Implementing this algorithm in an asynchronous way is just painful,
> in addition to be not efficient at all.
> 
> What we want to avoid is code duplication. But doing everything
> in the app's process doesn't seem right either.
> 
> The solution
> ============
> Let's do this in the ioslave's process just like we did before
> (i.e. it's done in the one matching the source protocol),
> but let's do it in a lib to avoid code duplication.
> 
> And it's a lot simpler to do. We just take what's common between
> file.cc and kioslave/ftp/main.cc for the recurse copying and
> move it to a lib. The operations in the algorithm remain synchronous,
> and the app doesn't lose time managing all the small operations
> required for a recurse copying.
> 
> I was thinking of a libkioslave for SlaveBase already. It seems it's
> the way to go for this as well.
> 
> The new problem
> ===============
> I thought of that before Waldo's last change.
> Tell me if I'm wrong : I think it doesn't clash with it.
> The slave would create such a job, but it would just need to be changed
> so that the slave provides the "get" part of FileCopyJob by itself.
> i.e. the FileCopyJob doesn't need to know about the src url, it just
> asks for data. Hmm, well that's a "put" isn't it ?
> 
Well, if you're doing a copy from ftp to file, you still need to create
dirs, etc. in a central place. Doing slaves from slaves is bad for me,
so it leaves the app and I don't think it's too bad. I buy the
performance
win, but I doubt it will be more than some percents.

Greetings, Stephan

-- 
It said Windows 95 or better, so in theory Linux should run it
                                                GeorgeH on /.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic