You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (is.null(irows)) {
if (is.atomic(jval)) {
jcpy = address(jval) %in% sapply(SDenv$.SD, address) # %chin% errors when RHS is list()
if (jcpy) jval = copy(jval)
} else if (address(jval) == address(SDenv$.SD)) {
jval = copy(jval)
} else if ( length(jcpy <- which(sapply(jval, address) %in% sapply(SDenv, address))) ) {
for (jidx in jcpy) jval[[jidx]] = copy(jval[[jidx]])
} else if (is.call(jsub) && jsub[[1L]] == "get" && is.list(jval)) {
jval = copy(jval) # fix for #1212
}
}
In particular:
sapply(jval, address) %in% sapply(SDenv, address)
Because jval in this case is an S4 object logic is such that the line above contained in the third level of the if/elseif statement is run since is.atomic(jval) is not true. Additionally, since Matrix defines an as.list method, sapply(jval, address) runs address on every single element of the Matrix, which results in a massive slow down. A possible fix might be to change line 1238 to:
if(!is.list(jval)) {
The text was updated successfully, but these errors were encountered:
Example (run on 1.9.6, but based on current master branch source the issue should be present there as well):
This appears to be caused by code starting at line 1237 of datatable.R:
In particular:
Because
jval
in this case is an S4 object logic is such that the line above contained in the third level of theif/elseif
statement is run sinceis.atomic(jval)
is not true. Additionally, sinceMatrix
defines anas.list
method,sapply(jval, address)
runsaddress
on every single element of theMatrix
, which results in a massive slow down. A possible fix might be to change line 1238 to:The text was updated successfully, but these errors were encountered: