diff --git a/NEWS b/NEWS
index 29c24c9436cfaf0e05a941a2b1ee3721d7564c5c..93567be28b265d6cff21d480704e219a28f71176 100644
--- a/NEWS
+++ b/NEWS
@@ -159,6 +159,8 @@ documents those changes that are of interest to users and admins.
  -- Improve setting of job wait "Reason" field.
  -- Correct sbatch documentation and job_submit/pbs plugin "%j" is job ID,
     not "%J" (which is job_id.step_id).
+ -- Improvements to sinfo performance, especially for large numbers of
+    partitions.
 
 * Changes in Slurm 2.6.3
 ========================
diff --git a/src/common/hostlist.c b/src/common/hostlist.c
index 720e3f0c0f88379c41e1171acb4e9a5f67b218ed..2e887e36f436d8f450ef8306133c4b089788b90f 100644
--- a/src/common/hostlist.c
+++ b/src/common/hostlist.c
@@ -1090,8 +1090,8 @@ static hostrange_t hostrange_intersect(hostrange_t h1, hostrange_t h2)
 
 	assert(hostrange_cmp(h1, h2) <= 0);
 
-	if ((hostrange_prefix_cmp(h1, h2) == 0)
-	    && (h1->hi > h2->lo)
+	if ((h1->hi > h2->lo)
+	    && (hostrange_prefix_cmp(h1, h2) == 0)
 	    && (hostrange_width_combine(h1, h2))) {
 
 		if (!(new = hostrange_copy(h1)))
@@ -1408,8 +1408,8 @@ static int hostlist_push_range(hostlist_t hl, hostrange_t hr)
 		goto error;
 
 	if (hl->nranges > 0
-	    && hostrange_prefix_cmp(tail, hr) == 0
 	    && tail->hi == hr->lo - 1
+	    && hostrange_prefix_cmp(tail, hr) == 0
 	    && hostrange_width_combine(tail, hr)) {
 		tail->hi = hr->hi;
 	} else {
@@ -2448,8 +2448,8 @@ static void hostlist_collapse(hostlist_t hl)
 		hostrange_t hprev = hl->hr[i - 1];
 		hostrange_t hnext = hl->hr[i];
 
-		if (hostrange_prefix_cmp(hprev, hnext) == 0 &&
-		    hprev->hi == hnext->lo - 1 &&
+		if (hprev->hi == hnext->lo - 1 &&
+		    hostrange_prefix_cmp(hprev, hnext) == 0 &&
 		    hostrange_width_combine(hprev, hnext)) {
 			hprev->hi = hnext->hi;
 			hostlist_delete_range(hl, i);
diff --git a/src/sinfo/sinfo.c b/src/sinfo/sinfo.c
index dcfc843b7ad8e9533cb55d31f97157511984fbe2..52b322a48797b071825871894bdef7b57f033623 100644
--- a/src/sinfo/sinfo.c
+++ b/src/sinfo/sinfo.c
@@ -438,7 +438,7 @@ static int _build_sinfo_data(List sinfo_list,
                         }
                         continue;
                 }
-		
+
 		j2 = 0;
 		while (part_ptr->node_inx[j2] >= 0) {
 			int i2 = 0;
@@ -826,9 +826,11 @@ static void _update_sinfo(sinfo_data_t *sinfo_ptr, node_info_t *node_ptr,
 			sinfo_ptr->max_cpu_load = node_ptr->cpu_load;
 	}
 
-	hostlist_push(sinfo_ptr->nodes,     node_ptr->name);
-	hostlist_push(sinfo_ptr->node_addr, node_ptr->node_addr);
-	hostlist_push(sinfo_ptr->hostnames, node_ptr->node_hostname);
+	hostlist_push(sinfo_ptr->nodes, node_ptr->name);
+	if (params.match_flags.node_addr_flag)
+		hostlist_push(sinfo_ptr->node_addr, node_ptr->node_addr);
+	if (params.match_flags.hostnames_flag)
+		hostlist_push(sinfo_ptr->hostnames, node_ptr->node_hostname);
 
 	total_cpus = node_ptr->cpus;
 	total_nodes = node_scaling;