<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
dancing	B-Data_Structure
tree	I-Data_Structure
is	O
a	O
tree	B-Application
data	I-Application
structure	I-Application
similar	O
to	O
B+	O
trees	O
.	O
</s>
<s>
It	O
was	O
invented	O
by	O
Hans	O
Reiser	O
,	O
for	O
use	O
by	O
the	O
Reiser4	B-Application
file	O
system	O
.	O
</s>
<s>
As	O
opposed	O
to	O
self-balancing	B-Data_Structure
binary	I-Data_Structure
search	I-Data_Structure
trees	I-Data_Structure
that	O
attempt	O
to	O
keep	O
their	O
nodes	O
balanced	O
at	O
all	O
times	O
,	O
dancing	B-Data_Structure
trees	I-Data_Structure
only	O
balance	O
their	O
nodes	O
when	O
flushing	O
data	O
to	O
a	O
disk	O
(	O
either	O
because	O
of	O
memory	O
constraints	O
or	O
because	O
a	O
transaction	O
has	O
completed	O
)	O
.	O
</s>
<s>
Also	O
,	O
because	O
this	O
optimization	O
is	O
done	O
less	O
often	O
than	O
with	O
other	O
tree	B-Application
data	I-Application
structures	I-Application
,	O
the	O
optimization	O
can	O
be	O
more	O
extensive	O
.	O
</s>
<s>
In	O
some	O
sense	O
,	O
this	O
can	O
be	O
considered	O
to	O
be	O
a	O
self-balancing	B-Data_Structure
binary	I-Data_Structure
search	I-Data_Structure
tree	I-Data_Structure
that	O
is	O
optimized	O
for	O
storage	O
on	O
a	O
slow	O
medium	O
,	O
in	O
that	O
the	O
on-disc	O
form	O
will	O
always	O
be	O
balanced	O
but	O
will	O
get	O
no	O
mid-transaction	O
writes	O
;	O
doing	O
so	O
eases	O
the	O
difficulty	O
of	O
adding	O
and	O
removing	O
nodes	O
during	O
a	O
transaction	O
.	O
</s>
<s>
In	O
general	O
,	O
dancing	B-Data_Structure
trees	I-Data_Structure
pose	O
greater	O
difficulty	O
than	O
conventional	O
trees	O
for	O
data	O
recovery	O
from	O
incomplete	O
transactions	O
,	O
though	O
this	O
can	O
be	O
addressed	O
by	O
more	O
thoroughly	O
accounting	O
for	O
transacted	O
data	O
.	O
</s>
