`

change buffer size in order to send chunks data in ampoule

 
阅读更多

ampoule use name pipe to communicate among processes. There is a limit about 4096 bytes

 

on windows. We can't send any data which has a length over 4000. hacking the twisted codes can solve this problem.

 

1: open twisted/internet/_pollingfile.py

 

search  FULL_BUFFER_SIZE.. the default value is 4096..change it to a bigger one...like 64*1024.

 

save it

 

2: open twisted/internet/_dumbwin32proc.py

 

move the cursor to line: 136..we can find some assignments like:

 

 

self.hStdoutR, hStdoutW = win32pipe.CreatePipe(sAttrs, 0)

self.hStderrR, hStderrW = win32pipe.CreatePipe(sAttrs, 0)

hStdinR,  self.hStdinW  = win32pipe.CreatePipe(sAttrs, 0)

 

replace them by:

 

 

self.hStdoutR, hStdoutW = win32pipe.CreatePipe(sAttrs, _pollingfile.FULL_BUFFER_SIZE)

self.hStderrR, hStderrW = win32pipe.CreatePipe(sAttrs, _pollingfile.FULL_BUFFER_SIZE)

hStdinR,  self.hStdinW  = win32pipe.CreatePipe(sAttrs, _pollingfile.FULL_BUFFER_SIZE)

 

save the file...all done

 

now...ampoule can send some 60K chunks.

 

 

分享到:
评论

相关推荐

    Read TDMS Channel Data in Chunks_tdms查看_

    提供的`Read TDMS Channel Data in Chunks.vi`示例程序展示了如何实现上述步骤。该VI打开一个TDMS文件,设置分块大小,然后逐块读取指定通道的数据。每次读取后,数据可能被可视化或进一步分析。通过查看和学习这个...

    计算机网络第六版答案

    Hence, it becomes possible for the attacker to issue a command to all the nodes, that target a single node (for example, all nodes in the botnet might be commanded by the attacker to send a TCP SYN ...

    文件内容读入chunks

    例如,在Java中,可以使用`BufferedReader`的`readLine()`方法按行读取,或者`InputStream`的`read(buffer)`方法按字节块读取。 总的来说,文件内容读入chunks是一种有效的处理大文件的策略,它可以确保程序在有限...

    yaffs2源码文件

    stored in 'chunks'. Chunks are the same size as NAND pages. Each page is marked with file id and chunk number. These marking 'tags' are stored in the OOB (or 'spare') region of the flash. The chunk ...

    Sakemail

    Dmitry Bondarenko say that some servers do not send the msg size after the RETR command, so he fix that issuing a LIST n command first (work nicely).- Added the property CC (Carbon Copy) to the ...

    Python for Data Analysis 第二版

    This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re ...

    php.ini-development

    will send that data in chunks of roughly the size you specify. ; Turning on this setting and managing its maximum buffer size can yield some ; interesting side-effects depending on your application ...

    buffer-chunks:将缓冲区拆分为一个块

    缓冲块 将缓冲区拆分为块 安装 npm install buffer-chunks ... var list = chunks ( new Buffer ( 'aaaaazzzzzbbbbb' ) , 5 ) ; // -> [ < Buffer> , < Buffer> , < Buffer> ] 执照 麻省理工学院

    Senfore_DragDrop_v4.1

    If you feel you need to send me a screen shot, please send it in GIF or PNG format. If you mail a bug report to me, please include the words "Drag Drop" in the subject of your email. --------------...

    前端开源库-suppress-chunks-webpack-plugin

    `suppress-chunks-webpack-plugin` 就是一个专门针对这种情况设计的插件,它的主要功能是抑制特定的Webpack打包块(chunks),从而优化生产构建的性能和体积。 Webpack 打包过程中产生的 chunks 可以理解为不同的...

    Pro Apache Hadoop(Apress,2ed,2014)

    data problems the MapReduce way, by breaking a big problem into chunks and creating small-scale solutions that can be flung across thousands upon thousands of nodes to analyze large data volumes in a ...

    DIZipWriter v6.2.0 for D7-XE10.1 ZIP 压缩 解压缩

    As data flows in (for example from a slow download), they can write it in small chunks at a time. DIZipWriter outputs all data to the archive straight away, with no need for temporary storage: It ...

    C++-leetcode题解之769. Max Chunks To Make Sorted.cpp

    c++ C++_leetcode题解之769. Max Chunks To Make Sorted.cpp

    python使用pandas读xlsx文件

    for chunk in pd.read_excel('data.xlsx', chunksize=chunksize): chunks.append(chunk) df = pd.concat(chunks) ``` Pandas读取的Excel文件会转换成DataFrame对象,这是一种二维表格型数据结构,非常适合进行数据...

    Python Text Processing with NLTK 2.0 Cookbook.pdf

    Learn how to easily handle huge amounts of data without any loss in efficiency or speed. This book will teach you all that and beyond, in a hands-on learn-by-doing manner. Make yourself an expert ...

    C++-leetcode题解之768. Max Chunks To Make Sorted II.cpp

    c++ C++_leetcode题解之768. Max Chunks To Make Sorted II.cpp

    buffer-file-stream:将每个缓冲区块写入具有递增文件名的单个文件

    // writes all Buffer 'data' chunks to blah-000.txt, blah-001.txt, etc // uses sprintf syntax for pattern var bfs = bufferFileStream ( '/tmp/blah-d.txt' ) ; bfs . write ( 'hello' ) ; // creates a text ...

Global site tag (gtag.js) - Google Analytics