Project

General

Profile

Actions

Bug #98

closed

PrintRawUriFp() makes a lower performance

Added by Pablo Rincon almost 15 years ago. Updated almost 15 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
Actions #1

Updated by Gurvinder Singh almost 15 years ago

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

Updated by Gurvinder Singh almost 15 years ago

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

Actions #3

Updated by Victor Julien almost 15 years ago

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.

Actions #4

Updated by Victor Julien almost 15 years ago

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

Also available in: Atom PDF