Re: [sword-devel] Delays in rendering?

2015-03-05 Thread Daniel Sheffield
Either way should work. Personally I prefer the members to be pointers. But perhaps it's just because I'm used to C... -- In the beginning Kibo created the Internet. Now the Internet was formless, and empty. Randomness was upon the face of computing, and the Spirit of ARPA moved upon the face of

Re: [sword-devel] Delays in rendering?

2015-03-01 Thread David Judah's Shadow Blue
On March 1, 2015 12:53:25 AM EST, Greg Hellings greg.helli...@gmail.com wrote: David, It's most common to pass it around as a pointer, that way you're guaranteed that there's only a single instance and you don't incur overhead from allocating on the stack So can I change my member properties

Re: [sword-devel] Delays in rendering?

2015-02-28 Thread Greg Hellings
David, It's most common to pass it around as a pointer, that way you're guaranteed that there's only a single instance and you don't incur overhead from allocating on the stack. --Greg On Sat, Feb 28, 2015 at 11:44 PM, David Judah's Shadow Blue yudahssha...@gmx.com wrote: So, I'm trying this

Re: [sword-devel] Delays in rendering?

2015-02-28 Thread David Judah's Shadow Blue
So, I'm trying this now, and I’m getting some seg faults. Can I pass my SWMgr library around inside different objects by assigning it to properties? (i.e. class.setLibrary(sword::SWMgr library) { this-swordLibrary = library; }) or do I need be sending it around via parameters via reference?

Re: [sword-devel] Delays in rendering?

2015-02-22 Thread David Judah's Shadow Blue
Here’s the relevant bits of code, std::string text = ; sword::ListKey refRange; sword::SWMgr library (new sword::MarkupFilterMgr (sword::FMT_PLAIN)); sword::SWModule *module; sword::VerseKey key; module = library.getModule (this-version.c_str()); if (!module) { text = -1; return text;

Re: [sword-devel] Delays in rendering?

2015-02-22 Thread Troy A. Griffitts
David, That's all fine. The initialization hit I spoke about in my last email will happen in the first section of your code. After that, you second section can run as many times as you'd like and should be extremely fast. Where are you noticing the speed delay? On February 22, 2015 8:39:28 AM

Re: [sword-devel] Delays in rendering?

2015-02-22 Thread David Judah's Shadow Blue
On February 22, 2015 11:11:00 AM EST, Troy A. Griffitts scr...@crosswire.org wrote: David, That's all fine. The initialization hit I spoke about in my last email will happen in the first section of your code. After that, you second section can run as many times as you'd like and should be

Re: [sword-devel] Delays in rendering?

2015-02-22 Thread Greg Hellings
sword::SWMgr library (new sword::MarkupFilterMgr (sword::FMT_PLAIN)); This line of code should only be executed once at program start-up and any time you detect a change in the installed modules - basically after interacting with the install manager to install a new work. (Even then there might

[sword-devel] Delays in rendering?

2015-02-21 Thread David Judah's Shadow Blue
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? -- Sent from my Android device with K-9 Mail. Please excuse my

Re: [sword-devel] Delays in rendering?

2015-02-21 Thread Troy A. Griffitts
Hey David, 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