From a8e11db6570261d2a3d7d9396b796b72998b7ec5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Jan 2019 13:03:08 +0000 Subject: Use buffered stdio Our generation of HTML triggers many small write(2) syscalls which is inefficient. Time output on a horrible query against my git.git mirror shows significant performance improvement: QUERY_STRING='id=2b93bfac0f5bcabbf60f174f4e7bfa9e318e64d5&id2=d6da71a9d16b8cf27f9d8f90692d3625c849cbc8' PATH_INFO=/mirrors/git.git/diff export QUERY_STRING PATH_INFO time ./cgit >/dev/null Before: real 0m1.585s user 0m0.904s sys 0m0.658s After: real 0m0.750s user 0m0.666s sys 0m0.076s --- html.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index 7f81965..cefcf5e 100644 --- a/html.c +++ b/html.c @@ -80,7 +80,7 @@ char *fmtalloc(const char *format, ...) void html_raw(const char *data, size_t size) { - if (write(STDOUT_FILENO, data, size) != size) + if (fwrite(data, 1, size, stdout) != size) die_errno("write error on html output"); } -- cgit 1.4.1 >
summary refs log tree commit diff
path: root/tag.c (unfollow)
Commit message (Expand)Author
2019-09-16Remove -W WEBIRC optionJune McEnroe
2019-09-16Use /etc/ssl/cert.pem in chrootJune McEnroe
2019-09-16Bump .so versions in chrootJune McEnroe
2019-09-16Set default nick to USER unless -PJune McEnroe
2019-09-16Add restricted modeJune McEnroe
2019-07-27Use braces in MakefileJune McEnroe
2019-07-27Make copyright headers consistentJune McEnroe
2019-07-27Mark sig_atomic_t array volatileJune McEnroe
2019-07-02Add /listJune McEnroe
2019-07-02Deal with ~users in colorGenJune McEnroe
2019-07-02Clean up input parameter handlingJune McEnroe
2019-07-02Split /raw and /quoteJune McEnroe
2019-07-02Add -k option for joining with keysJune McEnroe
2019-07-02Add optional key to /joinJune McEnroe
2019-07-02Restart process in sandmanJune McEnroe
2019-02-27Add /move commandJune McEnroe
2019-02-26Add M-/ to switch to previously active windowJune McEnroe
2019-02-25Move nick and tag coloring to color.cJune McEnroe
2019-02-25Add M-l to list the logJune McEnroe
2019-02-25Output raw to standard error if it is not a terminalJune McEnroe
2019-02-25Update tag colorsJune McEnroe
2019-02-25Add color to tagsJune McEnroe
2019-02-25Remove tag X macros againJune McEnroe
2019-02-25Add M-a to switch to hot or unread windowJune McEnroe
2019-02-25Refactor uiReadJune McEnroe
2019-02-24Scroll by full pages with PageUp/PageDownJune McEnroe
2019-02-23Clarify /window documentationJune McEnroe
2019-02-23Use first word of params in input commandsJune McEnroe
2019-02-23Add C-n and C-p key bindings to switch windowsJune McEnroe
2019-02-23Change example command to join #ascii.town on freenodeJune McEnroe
2019-02-23Call def_prog_mode after termNoFlowJune McEnroe
2019-02-22Move IRC formatting reset to C-sJune McEnroe
2019-02-22Disable terminal flow controlJune McEnroe
2019-02-22Bind up and down arrows to scrollJune McEnroe
2019-02-22Remove topic TODOJune McEnroe
2019-02-22Add /znc commandJune McEnroe
2019-02-22Update status line after scrolling and term eventsJune McEnroe
2019-02-22Reorganize input.cJune McEnroe
2019-02-22Fix name of <raw> window in man pageJune McEnroe
2019-02-22Rename global tags with angle bracketsJune McEnroe
2019-02-22Show status window while connectingJune McEnroe
2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe
2019-02-21Replace "view" with "window"June McEnroe
2019-02-21Remove ROT13June McEnroe
2019-02-21Clean up man pageJune McEnroe
2019-01-26Draw UI before connectingJune McEnroe
2019-01-25Avoid unused variable warnings with getyxJune McEnroe
2019-01-25Add GNU/Linux build instructionsJune McEnroe