1. Text I/O speed
- Posted by Robert Craig <72614.1667 at COMPUSERVE.COM> Nov 11, 1996
- 1735 views
- Last edited Nov 12, 1996
Adam H. Jackson writes: > However, interestingly it will not draw in BLACK! I imagine that this is > because BLACK is transparent. Can anybody clarify / confirm this? Yes, it seems that BLACK is transparent. I tried a 16-color and a 256-color mode. I was only vaguely aware of this before now. This could be useful in many applications, e.g. display_image() could print a shape on top of a background and the shape could be irregular and contain transparent "holes". > P.S. I have only been using Euphoria for the first time last week and am > very impressed. So far the only dispointment is the speed of the output > of text to the screen and input from the key board. (The buffer fills > faster than Euphoria can read it.) I imagine that this is because it > is > controlled through DOS and not direct. Anybody got a solution or include > that might help? Writing characters to the screen, one at a time, is quite slow due to DOS overhead. It's particularly slow if you are in a graphics mode (as opposed to a text mode). Try to write a long string of characters with a single puts() wherever possible. If you are desperate you can try poking characters into screen memory. The Euphoria editor seems to do ok by either writing a whole line to the screen at one time, or (when color syntax highlighting is in effect) writing pieces of a line that are all one color. A long time ago, ed used to write one character at a time. This was fine under Atari TOS, but was pretty bad when Euphoria was ported to DOS. As for input of characters, I believe you can perform get_key() or getc(0) at the rate of thousands per second. I don't think you can type that fast. Maybe the program you were using was doing a lot of other stuff in between reading characters. If you hit page-down in ed it will have to print a couple of thousand characters to the screen before it can read the next key. Rob Craig Rapid Deployment Software