Browse Prior Art Database

Externalstring Object for SmallTalk/V

IP.com Disclosure Number: IPCOM000105571D
Original Publication Date: 1993-Aug-01
Included in the Prior Art Database: 2005-Mar-20
Document File: 2 page(s) / 68K

Publishing Venue

IBM

Related People

Eisen, IR: AUTHOR [+2]

Abstract

Applications written in Smalltalk/V* can suffer from performance degradation because of the manner in which strings are handled in Smalltalk/V. This article describes a class which will yield performance improvements in Smalltalk/V based applications running on a workstation.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Externalstring Object for SmallTalk/V

      Applications written in Smalltalk/V* can suffer from
performance degradation because of the manner in which strings are
handled in Smalltalk/V.  This article describes a class which will
yield performance improvements in Smalltalk/V based applications
running on a workstation.

      Graphical applications using OS/2** or Windows*** which are
built using Smalltalk/V can exhibit performance problems because of
the handling of strings.  Strings are created and exist in the memory
managed by Smalltalk/V.  When these strings must be displayed to the
user they must be copied to memory outside of Smalltalk's memory.
This is done using the method copyToNonSmalltalkMemory.  This method
is inherently slow.  These strings also must be managed by the
Smalltalk/V virtual machine.  This requires that they be frequently
moved around in memory for operations involving garbage collection.
The other issue is that frequently these strings originate in another
program and already exist in external (to Smalltalk/V) memory.  This
disclosure describes an object which would alleviate these problems.

      ExternalString is a Smalltalk/V class which has the exact same
behavior as the class String.  Using the object oriented approach of
encapsulation, the internal implementation of the class can be
different than that of String while it exhibits the same external
behavior.  The implementation of ExternalString requires that the
actual contents of the string be kept in non-Smalltalk memory.  The
class ExternalString would simply keep a pointer to the actual
contents of the string.  If the string originates outside of
Smalltalk then the string is already in external memory and a pointer
is passed to Smalltalk.  Smalltalk will then typically copy the
string into it's own mem...