mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
(st_flush): Increase buffer by 1.5x when growing, to
avoid lots of copying where previoulsy growing by only 80 bytes at a time.
This commit is contained in:
parent
141de6078d
commit
0aae457a4a
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2005 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -133,7 +133,7 @@ st_flush (SCM port)
|
||||||
|
|
||||||
if (pt->write_pos == pt->write_end)
|
if (pt->write_pos == pt->write_end)
|
||||||
{
|
{
|
||||||
st_resize_port (pt, pt->write_buf_size + SCM_WRITE_BLOCK);
|
st_resize_port (pt, pt->write_buf_size * 3 / 2 + SCM_WRITE_BLOCK);
|
||||||
}
|
}
|
||||||
pt->read_pos = pt->write_pos;
|
pt->read_pos = pt->write_pos;
|
||||||
if (pt->read_pos > pt->read_end)
|
if (pt->read_pos > pt->read_end)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue