Project

General

Profile

Actions

Bug #98

closed
PR GS

PrintRawUriFp() makes a lower performance

Bug #98: PrintRawUriFp() makes a lower performance

Added by Pablo Rincon about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Inside PrintRawUriFp() we perform write operations of 1 character length. This is used by some of the output modules.

This means that for each character on a payload we will be doing a syscall of just 1 char as long as the lenght is. When writing to files, this will make the performance lower because of all the context switching. Potential fix: do a tmp copy of the buffer adjusting printable and non printable characters, and make only 1 write operation with it. Then free the tmp buffer (the copy plus 1 write should be less cost than 1 write per character).


Files

0001-bug-98.patch (1.04 KB) 0001-bug-98.patch Gurvinder Singh, 02/18/2010 02:32 AM

GS Updated by Gurvinder Singh about 16 years ago Actions #1

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Gurvinder Singh

GS Updated by Gurvinder Singh about 16 years ago Actions #2

the attached patch uses a temp buffer and writes the buffer in the end on 1 operation to given output file.

VJ Updated by Victor Julien about 16 years ago Actions #3

I've done a much simpler approach using a fixed size buffer and that requires no runtime memory allocation, because we were seeing segv's. Those were probably not caused by this function though, but by a bug in log-http.c.

VJ Updated by Victor Julien about 16 years ago Actions #4

  • Status changed from Resolved to Closed
  • Target version set to 0.8.1
Actions

Also available in: PDF Atom