On Wed, Jan 23, 2008, ShuXin Zheng wrote: > What's the reason except for TCP_DEFER_ACCEPT/SO_ACCEPTFILTER? > What are the main changes in your squid version?
There's no TCP_DEFER_ACCEPT or SO_ACCEPTFILTER being used here - its vanilla Linux-2.6 stuff with epoll. I've removed a lot of the memory copies and string allocations that are done. Header parsing is now done by creating references to the incoming socket buffer rather than creating individual strings The main CPU users now are malloc(), vfprintf(), free(), and the mempools code. strtok() make an appearance. I've made a decision to stop with the code refactoring and rewriting for the time being and work through my "stuff I broke" TODO list, making this code ready for proper testing (basically, authentication and disk storage are horribly broken right now.) Further speed improvements will be achieved by removing more of the temporary string buffers being created and reducing the memBuf and *printf() use in the main loop. Temporary, non-referenced buffers are currently being used for the URL/ host parts (which I can't really avoid just for now); Strings are being used for new headers during the reply (so the HIT/MISS strings for example); the strList() functions for doing hop-by-hop header filtering and some lookups (I've eliminated one of the blatantly stupid strList() uses; argh!) and the memBuf stuff can be eliminated somewhat by using writev() to write out replies. :) I can also reduce the number of write()s :) Adrian
