output$raw_data = DT::renderDataTable( # rendering this takes ~10 sec, with 400K rows, 300 cols { | |
get_select_data() | |
}, options = list(orderClasses = TRUE), | |
filter = 'top', rownames=FALSE | |
) | |
output$raw_reduced_data = DT::renderDataTable( # rendering this takes about ~10 min, with 100K rows, 4 columns | |
{ | |
input$loadButton | |
display_data <- data.table() | |
isolate({ | |
if (input$loadButton == 0) # if loadButton hasn't been pressed yet | |
return() # return nothing | |
withProgress(message = 'Loading data...', { | |
filtered_csv <- filter_csv() | |
}) | |
display_data <- head(filtered_csv, 100000) | |
print('filtered_csv info:') | |
print(dim(display_data)) | |
print(class(display_data)) | |
print(object.size(display_data)) | |
}) | |
print(display_data) | |
# 5-10 seconds to get to this point | |
print('rendering.........') | |
display_data # this step takes about 10 minutes for 100K rows | |
}, options = list(orderClasses = TRUE), | |
filter = 'top', rownames=FALSE | |
) |