Re (4): [Oberon] Bug report: Character insert speed in Edit under 8.24 alpha NO

pat at picoworks.com pat at picoworks.com
Mon Sep 2 07:41:01 CEST 2002


Pieter,
You are correct, it looks to be a problem with memory transfer
speeds with the implementation of VESA on the display controller I'm using.

On the other had TextDocs spends far less time in Display but is far more consistent
with adding characters in the middle of the texts due to it's different architecture. 

Solution, either use a supported display card or use TextDocs. For now I'll use
TextDocs.

Testing methodology follows: (KeyTest.Mod is included at the end of the message).

Edit.Open "", place the caret in the resulting window and run
Configuration.DoCommands
StatProf.Start
KeyTest.Do
StatProf.Stop
~
Move the caret to the beginning of the third line and run Configuration.DoCommands again.
In the first run with Edit it inserts 6721 characters and in the second only 92, quite a difference.

Here's the results with Edit, Script and TextDocs
Legend (all time in mS).  (The timings varied from run to run but these are typical).
	characters, total, time in Displays, Get, Set (the last two get and set are SYSTEM.MOVE instructions in the procedure Displays.Transfer
	CASE op OF get and set... in the VESA display module)
Edit
	6721, 20135mS, 14142, 11696, 1715
	92, 20038mS, 19904, 17219, 2616
Script
	829 20020mS, 18600, 120, 17402
	3501 200216mS, 13624, 6130, 4350
TextDocs
	4902, 20010mS, 10525, 3146, 5260
	3431, 20117mS, 11570, 3684, 4828



MODULE KeyTest;
	IMPORT Display, Oberon, Texts;
	VAR W: Texts.Writer;

PROCEDURE Do*;
	VAR M: Oberon.InputMsg; t: LONGINT; ch: CHAR; i: LONGINT;
BEGIN 
	t := Oberon.Time(); i := 0;
	REPEAT
		M.F := NIL; M.id := Oberon.consume; M.fnt := Oberon.CurFnt; M.col := Oberon.CurCol; M.voff := Oberon.CurOff;
		IF (i MOD 70) = 0 THEN M.ch := 0DX ELSE M.ch := "a" END;
		Display.Broadcast(M);
		INC(i);
	UNTIL  Oberon.Time() > t + 10000;
	Texts.WriteInt(W, i, 10); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf);
END Do;

BEGIN
	Texts.OpenWriter(W);
END KeyTest.
KeyTest.Do
System.Free KeyTest ~
Profiler.Profile KeyTest.Do ~

Configuration.DoCommands
StatProf.Start
KeyTest.Do
StatProf.Stop
~




More information about the Oberon mailing list