Changes codes

1) For uploading performance(part 1)
   Changed a code for large object uploading.
   New codes makes s3fs send parallel requests when s3fs uploads large 
   object(20MB) by multipart post.

   And added new "parallel_upload" option, which limits parallel request 
   count which s3fs requests at once.
   This option's default value is "5", and you can change this value. But it
   is necessary to set this value depending on a CPU and a network band.
   s3fs became to work good performance by this option, please try to set 
   your value for this option.

2) Changes debugging messages
    Changed debugging message in s3fs.cpp.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@456 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
ggtakec@gmail.com
2013-07-10 06:24:06 +00:00
parent 6e169f6bda
commit 1095b7bc52
8 changed files with 410 additions and 116 deletions

View File

@ -97,6 +97,32 @@ string urlEncode(const string &s)
return result;
}
//
// ex. target="http://......?keyword=value&..."
//
bool get_keyword_value(string& target, const char* keyword, string& value)
{
if(!keyword){
return false;
}
size_t spos;
size_t epos;
if(string::npos == (spos = target.find(keyword))){
return false;
}
spos += strlen(keyword);
if('=' != target.at(spos)){
return false;
}
spos++;
if(string::npos == (epos = target.find('&', spos))){
value = target.substr(spos);
}else{
value = target.substr(spos, (epos - spos));
}
return true;
}
string prepare_url(const char* url)
{
SYSLOGDBG("URL is %s", url);