pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Technical question about how Pan is implemented (hopefully n


From: Edith Gross
Subject: [Pan-users] Technical question about how Pan is implemented (hopefully not OT)
Date: Sun, 28 Sep 2003 17:26:29 +0200
User-agent: Opera7.11/Win32 M2 build 2880

I just wonder how data are received in Pan, that is how many times are the data copied until the are displayed or written to disk.

When you receive the data from the socket, you "read" them and then you copy all data first. But you cannot read a line directly (g_io_chanel_read_line_string beeing a rather high level function, offering a functionality the socket does not provide), so probably they are copied the second time, etc.

Is not the best way to allocate 50M of memory and then read all the data into that memory from the socket. Then the whole formatting and scanning of lines and searching for the last ".\r\n" could be done in situ, without moving the data.

Or has this solution its drawbacks too? 50M is nothing nowadays (my machine has for example 2G of ram)? Or maybe the copying is so fast (at 3.0GHz) that this is not necessairy?

Then as the data are received, another thread could scan and decode them at the same time for the fastest possible performance?

I also noticed that the most time consuming operation is the final filtering that may take seconds.

TIA,
--
EG





reply via email to

[Prev in Thread] Current Thread [Next in Thread]