Improving the speed of XGBoost CV My data set has around 5 mil rows. I intend to use xgb,cv to find optimal no of tress and then use caret wrapper or my own custom hyper-parameter tuning function.
XGBoost's in-built cv itself is taking a long time. I guess other functions will take even more time.
Previsouly I worked on smaller data sets. XGboost ran very fast and smooth.
so far I have tried doing CV by converting training data frame to  sparse matrix, dcgMatrix and several other matrix types. Still it's taking lot of time.
Last resort is to make a validation set and try to use that set for parameter tuning. theoretically this is more sound idea, but I have never tried it so little unsure about this.
what are few ways to deal with large data sets? 
 A: The "tricks" I am familiar with are :
Sparse matrices, which you already used. However, you need to make sure that the percentage of non zero values in your matrix is low (otherwise, it could actually take longer to run)
Grow the trees one by one and observe the performance after each batch 
I once used the following (with sklearn's implementation of GBMs)
def heldout_auc(model, X_test, y_test):
    score = np.zeros((model.get_params()["n_estimators"],), dtype=np.float64)
    for i, y_pred in enumerate(model.staged_decision_function(X_test)):
        score[i] = auc(y_test, y_pred)
    return score

def cv_boost_estimate(X,y,model,n_folds=3):
    cv = cross_validation.StratifiedKFold(y, n_folds=n_folds, shuffle=True, random_state=11)
    val_scores = np.zeros((model.get_params()["n_estimators"],), dtype=np.float64)
    t = time()
    i = 0
    for train, test in cv:
        i = i + 1
        print('FOLD : ' + str(i) + '-' + str(n_folds))
        model.fit(X.iloc[train,], y.iloc[train])
        val_scores += heldout_auc(model, X.iloc[test,], y.iloc[test])
    val_scores /= n_folds
    return val_scores,(time()-t)

Reduce the number of folds of your CV (which can harm performance). This is close to what you describe with a validation set : "Last resort is to make a validation set and try to use that set for parameter tuning". However, I would not recommend this approach. As boosting involves a lot of parameters, you could easily be trapped in overfitting the validation set.
Focus on some parameters Disclaimer, this is highly empirical ! In my experience, the most important parameters are max_depth, $\eta$ and $n_{trees}$. And the last two "work together" : decreasing $\eta$ and increasing $n_{trees}$ can help you improve the performance of the model. Whereas it seems that there is an "optimal" max depth parameter. 
The other parameters (colsample_bytree, subsample) are usually less relevant.
Have a look at the python implementation I observed a better usage of my processors with python than with R. Maybe this has been fixed since though...
