buglwIP - A Lightweight TCP/IP stack - Bugs: bug #49976, Some performance issue

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #49976: Some performance issue

Submitter:  Wen Xichang <wenxichang>
Submitted:  Tue 03 Jan 2017 04:44:06 AM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Feature Request Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.0.0

Tue 24 Jan 2017 09:44:30 AM UTC, comment #2: 

After all, this is not a bug. Please post patches (we can't afford to develop them for you, currently) for your ideas to have a clean place for discussion.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 04 Jan 2017 02:09:36 PM UTC, comment #1: 

Up to now, we have deliberately chosen small size over performance. In the last years, however, lwIP seems to attract more and more people not caring for the "lightweight" in our name (mainly since there seems to be no decent free alternative even for higher performance?)

In the end, I'm open for such a change as long as it's optional (i.e. no code & ram increasement for those wanting low resource usage). Plus I won't work on that, but patches to be discussed here are always welcome.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 03 Jan 2017 04:44:06 AM UTC, original submission:  

1. find a free socket seem not efficient (sockets.c: alloc_socket)
   why not add a free list like:

    int free_socks[NUM_SOCKETS];
    int num_free_socks;
  
   alloc_socket:
   if (num_free_socks <= 0)
       return EMFILE;
   num_free_socks--;
   s = free_socks[num_free_socks]

   this improvement take only (NUM_SOCKETS + 1) int ram.

2. tcp_active_pcbs, why not use hash, a 64-slots-hash will greatly improve perf, only extra 63 pointers taken.

3. socket_event should expose some API so that developer can easily impl their own poll/epoll/kqueue, like:

   typedef void (*lwip_sock_event_cb)(int sock, int readable, int writeable, int exception, void *userdata);
   int lwip_sock_reg_event_cb(lwip_sock_event_cb cb, void *userdata);


Wen Xichang <wenxichang>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by wenxichang (Submitted the item)
  • -email is unavailable- added by wenxichang
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-24 goldsimon StatusNone Invalid
        Open/ClosedOpen Closed
    2017-01-03 wenxichang Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code