Menu

#1842 linein performance issue

5.0.0
pending
Erich
None
code
1
2023-10-28
2022-09-11
Erich
No

On Windows reading the first line with linein has a runtime that goes up with the square of the line length, e. g.
10mb 3.7 s
100mb 337.6 s
Our variable line read code extends the read buffer by a small fixed amount each time more space is required which a seemingly inefficient realloc doesn't handle well.

Doubling the read buffer size when more space is needed should fix this (gaining orders of magnitudes for e. g. a one GB linein).

This seems to be a lesser issue on Linux, but the proposed fix will still provide some speed-up.

Related

Bugs: #1842

Discussion

  • Erich

    Erich - 2022-09-11
    • status: open --> accepted
    • assigned_to: Erich
    • Pending work items: none --> code
     
  • Erich

    Erich - 2022-09-11

    Committed code fix with revision [r12511].

     

    Related

    Commit: [r12511]

  • Rony G. Flatscher

    • Group: None --> 5.0.0
     
  • Per Olov Jonsson

    • Group: 5.0.0 --> 5.1.0
     
    • Rick McGuire

      Rick McGuire - 2023-05-12

      On Fri, May 12, 2023 at 2:56 PM Per Olov Jonsson perolovjonsson@users.sourceforge.net wrote:

      • Group: 5.0.0 --> 5.1.0

      In general, the Group is usually left as "none" until there is a fix
      available and it decided when it will be available.


      [bugs:#1842] linein performance issue

      Status: accepted
      Group: 5.1.0
      Created: Sun Sep 11, 2022 03:56 PM UTC by Erich
      Last Updated: Tue Dec 20, 2022 12:09 PM UTC
      Owner: Erich

      On Windows reading the first line with linein has a runtime that goes up
      with the square of the line length, e. g.
      10mb 3.7 s
      100mb 337.6 s
      Our variable line read code extends the read buffer by a small fixed
      amount each time more space is required which a seemingly inefficient
      realloc doesn't handle well.

      Doubling the read buffer size when more space is needed should fix this
      (gaining orders of magnitudes for e. g. a one GB linein).

      This seems to be a lesser issue on Linux, but the proposed fix will still
      provide some speed-up.


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/oorexx/bugs/1842/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

       

      Related

      Bugs: #1842

      • Per Olov Jonsson

        Point taken

        Hälsningar/Regards/Grüsse,
        P.O. Jonsson
        oorexx@jonases.se

        On 12. May 2023, at 20:58, Rick McGuire bigrixx@users.sourceforge.net wrote:

        On Fri, May 12, 2023 at 2:56 PM Per Olov Jonsson perolovjonsson@users.sourceforge.net wrote:

        • Group: 5.0.0 --> 5.1.0

        In general, the Group is usually left as "none" until there is a fix
        available and it decided when it will be available.


        [bugs:#1842] linein performance issue

        Status: accepted
        Group: 5.1.0
        Created: Sun Sep 11, 2022 03:56 PM UTC by Erich
        Last Updated: Tue Dec 20, 2022 12:09 PM UTC
        Owner: Erich

        On Windows reading the first line with linein has a runtime that goes up
        with the square of the line length, e. g.
        10mb 3.7 s
        100mb 337.6 s
        Our variable line read code extends the read buffer by a small fixed
        amount each time more space is required which a seemingly inefficient
        realloc doesn't handle well.

        Doubling the read buffer size when more space is needed should fix this
        (gaining orders of magnitudes for e. g. a one GB linein).

        This seems to be a lesser issue on Linux, but the proposed fix will still
        provide some speed-up.


        Sent from sourceforge.net because you indicated interest in <
        https://sourceforge.net/p/oorexx/bugs/1842/>

        To unsubscribe from further messages, please visit <
        https://sourceforge.net/auth/subscriptions/>


        [bugs:#1842] linein performance issue

        Status: accepted
        Group: 5.1.0
        Created: Sun Sep 11, 2022 03:56 PM UTC by Erich
        Last Updated: Fri May 12, 2023 06:56 PM UTC
        Owner: Erich

        On Windows reading the first line with linein has a runtime that goes up with the square of the line length, e. g.
        10mb 3.7 s
        100mb 337.6 s
        Our variable line read code extends the read buffer by a small fixed amount each time more space is required which a seemingly inefficient realloc doesn't handle well.

        Doubling the read buffer size when more space is needed should fix this (gaining orders of magnitudes for e. g. a one GB linein).

        This seems to be a lesser issue on Linux, but the proposed fix will still provide some speed-up.


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oorexx/bugs/1842/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         

        Related

        Bugs: #1842

  • Per Olov Jonsson

    • Group: 5.1.0 --> None
     
  • Erich

    Erich - 2023-10-28
    • status: accepted --> pending
    • Group: None --> 5.0.0
     
  • Erich

    Erich - 2023-10-28

    Committed code fix with revision [r12511].

     

    Related

    Commit: [r12511]

Anonymous
Anonymous

Add attachments
Cancel