[R-Forge #5102] printing (on screen) takes a very long time for large data.tables #549

arunsrinivasan opened this Issue Jun 8, 2014 · 2 comments


None yet
2 participants

arunsrinivasan commented Jun 8, 2014

Submitted by: Eduard Antonyan; Assigned to: Nobody; R-Forge link

Consider dt = data.table(a = 1:1e9).

There is a very large time difference between typing

dt [ENTER]


print(dt) [ENTER]

The latter is instantaneous, while the former takes a very long time (not quite sure how to measure and show the time difference here, as system.time does not capture it).


mattdowle commented Aug 13, 2014

It appears to be due to a copy being made of the entire DT by what's known as auto-printing in R. There was a promising fix in v3.1.1 for it :

Auto-printing would re-evaluate its argument when trying to dispatch to a print method. This is now avoided when possible.

But that doesn't seem to have worked in our case. Needs a closer look.
In the meantime, we still have to write print(DT) explicitly for instant printing.


arunsrinivasan commented Jul 18, 2015

This is fixed with R v3.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment