<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=UniStringChange</id>
	<title>UniStringChange - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=UniStringChange"/>
	<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=UniStringChange&amp;action=history"/>
	<updated>2026-04-28T23:16:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://pickwiki.org/index.php?title=UniStringChange&amp;diff=2368&amp;oldid=prev</id>
		<title>Conversion script: link fix</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=UniStringChange&amp;diff=2368&amp;oldid=prev"/>
		<updated>2015-02-26T23:48:56Z</updated>

		<summary type="html">&lt;p&gt;link fix&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
For a 377,715 character [[UniString]]?, this code takes over 3 minutes to run on my desktop: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   String mark = uString.get[[MarkCharacter]]( [[UniTokens]].FM );&lt;br /&gt;
   String linesep = System.getProperty( &amp;quot;line.separator&amp;quot; );&lt;br /&gt;
   uString.change( mark, linesep );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Doing the same thing on the database server takes less than a second: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OPEN &amp;#039;HOLD&amp;#039; TO F.HOLD ELSE STOP&lt;br /&gt;
K.HOLD = &amp;#039;FFAREP.01.WSMOAK.022004&amp;#039;&lt;br /&gt;
READ R.HOLD FROM F.HOLD, K.HOLD THEN&lt;br /&gt;
   SWAP @FM WITH CHAR(010):CHAR(013) IN R.HOLD&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Admittedly my machine is less powerful than the 4-processor database server, but I still think 3 minutes is excessive. What is [[UniString]]? doing in there?! &lt;br /&gt;
&lt;br /&gt;
I considered moving the string manipulation up to the database server and having a subroutine do the read and swap before returning the text, but thought I&amp;#039;d give Java a shot at it first: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   String temp = uString.toString();&lt;br /&gt;
   String mark = uString.get[[MarkCharacter]]( [[UniTokens]].FM );&lt;br /&gt;
   String linesep = System.getProperty( &amp;quot;line.separator&amp;quot; );&lt;br /&gt;
   String temp2 = temp.replaceAll( mark, linesep );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That runs in 1/3 of a second. Good news, I don&amp;#039;t have to write a subroutine! &lt;br /&gt;
&lt;br /&gt;
String.replaceAll arrived with JDK 1.4, so it&amp;#039;s understandable that [[UniObjects]] for Java doesn&amp;#039;t use it.  However, until [[UniString]].change() is improved, I can&amp;#039;t recommend using it for large Strings.&lt;/div&gt;</summary>
		<author><name>Conversion script</name></author>
	</entry>
</feed>