IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New JDBC PreparedStatements
The strings are used in the creation of PreparedStatements - oddly enough, we are reconsidering the use of PreparedStatements based on some information in an O'Reilly book on Oracle & JDBC - the sample chapter on the web site shows that [in the autor's tests] PreparedStatement operations are slower than other Statements.
New Depends on the database
I've seen that assertion in regards to SQL Server, but not Oracle.

Link?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New But back to the main question...
Why are you spending so much time worrying about a few Strings if they only get used once?

Use a performance profiling tool and find your real bottlenecks, instead of guessing.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Yeeha, Scott
But you wouldn't believe (er, on second thought, maybe you would) the companies that won't spend $500 or $1000 (or whatever it is, I think the max cost I've seen was $3000) on a profiling tool that *really* seeks out inefficiencies.

On second thought, many of the profiling tools I've used under Unix became worthless when compiled with vendor's object-only libraries. cc compiled with profiling (with third-party object libraries) loses itself in untracable links more often than not, in my experience.
"Beware of bugs in the above code; I have only proved it correct, not tried it."
-- Donald Knuth
New Java profiling usually works pretty well
I'll dig up some links.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I believe that, no links required
Unless they call native code, Java classes are reasonably exposed to a profiler.

Alas, I've run into C code that ran into the roadblock of vendor libraries. You can get some good information out of cc compiled for gprof, but many times it is only tantalizing as to where it leads you.
"Beware of bugs in the above code; I have only proved it correct, not tried it."
-- Donald Knuth
New Try: JProbe...
New Oh I believe it
Like the people I've talked to who don't like using generalized functions stored in Postgres. They prefer to hand tune the queries. When you're querying terrabytes of data, maybe. But we were talking about a templating system for a (fairly) low-volume extranet. Take the money you save in developers' time ( ten minutes per query X several dozen pages ) and double the amount of RAM in your webserver.

There are times throwing hardware at it is the solution. Otherwise we'd all be writing in assembly.
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
New Kinda missing the point...
... the point is to optimize the stuff that gets run often. Loops, queries, repeated operations. Not one-time inits, or static vs. non-static strings that are used once as in this case.

The profiler will tell you what's taking the most time in the app. Hit the hot spots with the optimizations and you'll get the most return for your time.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Java String field optimization tips? - (dlevitt) - (33)
         Strings shouldn't matter. - (admin) - (9)
             JDBC PreparedStatements - (dlevitt) - (8)
                 Depends on the database - (admin)
                 But back to the main question... - (admin) - (6)
                     Yeeha, Scott - (wharris2) - (5)
                         Java profiling usually works pretty well - (admin) - (2)
                             I believe that, no links required - (wharris2)
                             Try: JProbe... -NT - (slugbug)
                         Oh I believe it - (drewk) - (1)
                             Kinda missing the point... - (admin)
         Real world experience - (Yendor) - (18)
             (The technical reason) - (wharris2) - (7)
                 The technical reason behind the technical reason - (admin) - (6)
                     I don't believe it - (ben_tilly) - (5)
                         That would help, but.... - (marlowe) - (1)
                             The scheme addresses those acceptably well - (ben_tilly)
                         Compile time only - (dlevitt) - (2)
                             Are you sure? - (marlowe)
                             Compile time concatenation - (ChrisR)
             Sounds like a shitty compiler. - (tuberculosis) - (9)
                 Wrong, syntactically - (wharris2) - (8)
                     Read it again - (tuberculosis) - (7)
                         But what about the general case? - (ben_tilly) - (6)
                             Re: But what about the general case? - (tuberculosis) - (5)
                                 (arguing) - (wharris2)
                                 I always get dubious... - (ben_tilly) - (3)
                                     Don't know why - (tuberculosis) - (2)
                                         Whacky overloading. Yes. -NT - (wharris2)
                                         That I will agree with - (ben_tilly)
         Depends - (ChrisR)
         I don't think it will affect speed - (Arkadiy) - (1)
             Yep, its a size issue. - (tuberculosis)
         Re: Java String field optimization tips? - (dshellman)

Following the ASCII standard since 2001.
57 ms