[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Logging Library-GSOC
From: |
Werner LEMBERG |
Subject: |
Re: Logging Library-GSOC |
Date: |
Sat, 18 Jul 2020 16:55:23 +0200 (CEST) |
> When I am redirecting stderr logs to a text file using: `main
> arial.ttf qwertyuiopasdfghjklzxcvbnm 2>sdterr_logs.txt` I am getting
> the following results:
>
> `FT_LOGGING`: 8 sec
> `FT_DEBUG_LEVEL_TRACE`: 11 sec
This still looks fishy.
>> Otherwise I guess the big difference between `FT_LOGGING` and
>> `FT_DEBUG_LEVEL_TRACE` is due to file buffering. In other words,
>> data sent to `stderr` gets output line by line to the screen, which
>> is slow, while data sent to the log file gets buffered completely,
>> and it is written to the disk in asynchronously to avoid write
>> delays.
>
> I guess this is only the reason for the difference between the time
> values of `FT_LOGGING` and `FT_DEBUG_LEVEL_TRACE`...
Probably yes. At least the difference between the two approaches
shouldn't be *that* large, I believe.
>> Maybe it makes sense to use C function `setvbuf` to exactly control
>> the buffering mode of the output file descriptor.
>
> Ok, I will try this one out, but I guess using the `setvbuf()` in no
> buffering mode for writing logs to a file will give the same time
> value as time value produced when logs are written to stderr line by
> line...
Well, for comparison purposes the buffering mode should be the same
for `FT_LOGGING` and `FT_DEBUG_LEVEL_TRACE`.
Werner
- Re: Logging Library-GSOC, (continued)
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/14
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/16
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/16
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/16
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/16
- Re: Logging Library-GSOC, Vincent Torri, 2020/07/16
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/16
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/17
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/18
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/18
- Re: Logging Library-GSOC,
Werner LEMBERG <=
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/18
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/18
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/21
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/21
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/22
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/24
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/25
- Re: Logging Library-GSOC, Priyesh kumar, 2020/07/31
- Re: Logging Library-GSOC, Werner LEMBERG, 2020/07/31
- Re: Logging Library-GSOC, Vincent Torri, 2020/07/21