<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20689">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst,
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle,
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div>
Here’s the relevant bits of code,</div><div><br></div><div>std::string text = "";<br>sword::ListKey refRange;<br>sword::SWMgr library (new sword::MarkupFilterMgr (sword::FMT_PLAIN));<br>sword::SWModule *module;<br>sword::VerseKey key;<br> <br>module = library.getModule (this->version.c_str());<br>if (!module) {<br> text = "-1";<br> return text;<br>}<br> <br>refRange = key.parseVerseList (reference.c_str(), key, true);<br>for (refRange = sword::TOP; !refRange.popError(); refRange++) {<br> module->setKey (refRange);<br> text += module->getKeyText();<br> text += " ";<br> text += module->renderText();<br>}<br>return text;<br></div><div data-signatureblock="true"><div><br></div><div>If it makes any difference, the only installed module is the ESV.</div><div><br></div><div>Sent from Windows Mail</div><div><br></div></div><div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;"><div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style='line-height: 15pt; letter-spacing: 0.02em; font-family: "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 12pt;'><b>From:</b> <a href="mailto:scribe@crosswire.org" target="_parent">Troy A. Griffitts</a><br><b>Sent:</b> Sunday, February 22, 2015 12:13 AM<br><b>To:</b> <a href="mailto:sword-devel@crosswire.org" target="_parent">SWORD Developers' Collaboration Forum</a></font></div></div><div><br></div><div dir="">
Hey David,<br>
<br>
It's hard to say without knowing what calls you're making to the
API, but yes, it's likely you're doing something not in the optimal
way. My first guess is that you are calling an external program
repeated to get results. SWORD has an initialization hit when it
first is accessed-- finding all modules, loading locales, etc. Once
initialized, calls should be very fast, but if you are launching an
external program over and over, the engine is initializing on each
call. Maybe not what you're doing, but without more info, that's my
best shot.<br>
Hope we can get you running fast.<br>
<br>
Troy<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 02/21/2015 07:16 PM, David "Judah's
Shadow" Blue wrote:<br>
</div>
<blockquote style="margin-top: 0px; margin-bottom: 0px;" cite="mid:D43081F4-39FE-40FE-800F-F11A7C5B0630@gmx.com">So I'm working on a console based front-end, and I'm
noticing some slowness in displaying a text. Possibly a second or
less, but definitely noticeable. Is there something I may be doing
wrong?<br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my
brevity.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org" target="_parent">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_parent">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above pagess is</pre>
</blockquote>
</div>
</div>
</body>
</html>