Java Reference
In-Depth Information
Table A.1
Cross-reference of antipatterns by name (continued)
Name
Description
Solution
Symptoms
Location
20. Split Cleaners
When a resource is allocated sep-
arately from where it is freed,
cleanup can be potentially lost.
Pairing alloca-
tion with free
Resource leaks
Chapter 7,
Section 7.3
21. Synchronized
Read/Write
Bottleneck
The Java programming language
locks on the object level for syn-
chronization, but does not distin-
guish between readers and
writers. This locking mechanism is
too restrictive for applications like
databases and caches.
Read/write
locks
Poor performance
Chapter 5,
Section 5.5
22. Thrash-tuning
Performance tuning is difficult
without a solid baseline or when
multiple configuration parameters
are changed at once between
measurements. Attempting perfor-
mance tuning in these conditions
can result in similar or identical
tests run several times, giving the
appearance of thrashing.
Good testing
methodology
and a good test-
ing environment
are the primary
keys. Baseline
measurements
are mandatory.
All tests should
start from a
common config-
uration and
change a single
parameter at a
time.
Inefficient perfor-
mance testing
and tuning, longer
than expected
performance tun-
ing cycles, and
unclear results of
performance
improvements
Chapter 10,
Section 10.6
23. Too Many
Webpage
Items
Many web designers have no con-
cept of the costs associated with
loading web page items like graph-
ics or animations. Since items
have incremental load costs, too
many objects can doom perfor-
mance.
Eliminate extra-
neous objects
Poor performance
Chapter 2,
Section 2.2.7
24. XML Golden
Hammer
XML, like many powerful technolo-
gies, can be misused. In this
case, we are using XML to do
large-scale search or summary
missions.
Databases,
indexed XML
Poor performance
Chapter 7,
Section 7.5.1
Search WWH ::




Custom Search