PERF: skip non-consolidatable blocks when checking consolidation by jorisvandenbossche · Pull Request #32826 · pandas-dev/pandas (original) (raw)
Not specific to SparseArray, it's for all non-consolidatable blocks (which is now just ExtensionBlock I think?)
It's just that creating a DataFrame from sparse matrix is a case where you only have extension blocks, and thus were this is relatively more costly.
I suppose that we can get rid of ftype
entirely, as indeed, that was only used in the past to differentiate dense and sparse dtypes, but now sparse dtypes are ExtensionDtypes, and not numpy dtypes, so we don't need that anymore.