Changeset a75f5a1 in git


Ignore:
Timestamp:
10/07/10 13:19:15 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.1.14, svn/tags/1.1.15, svn/tags/1.1.16, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
b7510ee
Parents:
9c0b089
Message:

src/cavernlog.cc: Set the select timeout before calling wxYield()
when waiting for output from cavern to 0.1s instead of 0.00001s to
avoid yielding excessively on slower machines where this is likely
to really slow things down. Call Scroll() only once per line in
the case where we are updating the scrollbar position. Call
Update() instead of wxYield() after each line, since that's enough
to get the window updated. Remove unused assignment "ch = left;"
at end of loop.

git-svn-id: file:///home/survex-svn/survex/trunk@3479 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r9c0b089 ra75f5a1  
     1Sat Jul 10 12:15:23 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/cavernlog.cc: Set the select timeout before calling wxYield()
     4          when waiting for output from cavern to 0.1s instead of 0.00001s to
     5          avoid yielding excessively on slower machines where this is likely
     6          to really slow things down.  Call Scroll() only once per line in
     7          the case where we are updating the scrollbar position.  Call
     8          Update() instead of wxYield() after each line, since that's enough
     9          to get the window updated.  Remove unused assignment "ch = left;"
     10          at end of loop.
     11
    112Fri Jul 09 14:42:47 GMT 2010  Olly Betts <olly@survex.com>
    213
  • src/cavernlog.cc

    r9c0b089 ra75f5a1  
    22 * Run cavern inside an Aven window
    33 *
    4  * Copyright (C) 2005,2006 Olly Betts
     4 * Copyright (C) 2005,2006,2010 Olly Betts
    55 *
    66 * This program is free software; you can redistribute it and/or modify
     
    216216        FD_ZERO(&efds);
    217217        FD_SET(cavern_fd, &efds);
     218        // Set timeout to 0.1 seconds.
    218219        struct timeval timeout;
    219220        timeout.tv_sec = 0;
    220         timeout.tv_usec = 10;
     221        timeout.tv_usec = 100000;
    221222        if (select(cavern_fd + 1, &rfds, NULL, &efds, &timeout) == 0) {
    222223            wxYield();
     
    294295                AppendToPage(cur);
    295296
    296                 // Restore the scrollbar positions.
    297                 Scroll(scroll_x, scroll_y);
    298 
    299297                if (!link_count) {
    300298                    // Auto-scroll the window until we've reported a warning or
     
    307305                    int xu, yu;
    308306                    GetScrollPixelsPerUnit(&xu, &yu);
    309                     Scroll(-1, y / yu);
    310                 }
     307                    Scroll(scroll_x, y / yu);
     308                } else {
     309                    // Restore the scrollbar positions.
     310                    Scroll(scroll_x, scroll_y);
     311                }
     312
    311313                cur.clear();
    312                 wxYield();
     314                Update();
    313315                break;
    314316            }
     
    329331                }
    330332        }
    331         ch = left;
    332333    }
    333334    int retval = pclose(cavern_out);
Note: See TracChangeset for help on using the changeset viewer.