How does Zone Visibility perform? | New in Tableau 2022.3
I use performance recording to crack open what Tableau really does behind hidden zones when you use zone visibility.
- Start performance recording before opening any workbook, via Help > Settings and Performance > Start Performance Recording, so the capture runs in the background from the very beginning
- Leave deliberate gaps between actions when recording so each activity shows clearly on the resulting timeline
- The performance recording output gives both an overview dashboard and a detailed event timeline you can rebuild by dropping fields like start index, event and worksheet onto the view
- Tableau appears to run all queries and compute layouts for hidden zones up front, only rendering the visible zone when you switch to it, so heavy queries behind a hidden zone still load at the start
- Click the green query items in the recording to see the actual SQL sent to the database for debugging
0:00Hey, it's Tim here. In today's video, we
0:01just want to answer a very brief question.
0:03What happens when you hide a section when
0:05using zone visibility? This was a question
0:08that someone asked in the comments. And I
0:09thought, let's try and make a video and
0:11show you how I'm going to try and answer
0:13the question. It might not be the official
0:15answer. Obviously, we'll reach out to Table
0:17au to see if that's the case. But I can show
0:18you how I might be able to find out the
0:20answer using performance recording. Let's
0:23get stuck in. Okay, so here we are in Table
0:25au. Now the key to doing this test is you
0:28want to make sure you do the performance
0:29recording.
0:29At the very start, so you don't actually
0:32open your workbook, you open Tableau
0:34without opening a workbook. And then you go
0:36over to the top. And this is how you open
0:38the performance recording option, you go to
0:40help, you go to settings and performance,
0:42and then you select to start performance
0:44recording. Once you do that, nothing
0:46happens. It essentially runs in the
0:48background. But the performance recording
0:50is running because if you go to help go to
0:52settings and performance and stop
0:54performance recording is there. That means
0:55it's already running. Now, we've done that
0:58we can actually go ahead and do that.
0:59And open the workbook. So I'm opening up
1:02the demo work that I used in that
1:04particular demo. And you can see it loads
1:06up the workbook, I'm going to wait a few
1:08seconds and just fill the air because what
1:11I'd like to do is have a gap between when I
1:13loaded the workbook and the next activity
1:15that I do. So I can see very clear moments
1:17in time, when I did activities in the work
1:20book, if you do things too quickly, it's
1:21actually quite hard to see it very clearly.
1:23So now that that's been running for a while
1:26, I'll go ahead and select furniture.
1:28Furniture is actually a different zone that
1:30's enabled using a parameter actions, go and
1:32check the video to find out how that works.
1:34But go ahead and select furniture, you'll
1:36see it loads up a different part of the
1:37chart. I'll wait a few seconds, fill some
1:40air for some time. Maybe I'll skip ahead in
1:42the video by cutting it right here. Again,
1:45we're back. And now I'm going to go ahead
1:47and select office. We're going to wait a
1:49while again, and I'll cut away the gap.
1:51Okay, and now we're back, we've let the
1:53recording run for some time. And now I'm
1:55going to select technology again, to let
1:57that run for a
1:58bit. And that's pretty much it. That's all
2:00we're going to do, we're just going to
2:02click on the different zones, I've done
2:04nothing else, I've not used any filters, I
2:06'm not generating anything, just to show you
2:08what a filter would do, what I will do is
2:09go ahead and deselect accessories and cop
2:12iers from the technology section. So we can
2:15see that working on the technology works
2:17heet. But nonetheless, I think we're pretty
2:19much good to go, we can go ahead and stop
2:21the performance recording. To stop a
2:23performance recording, you just go up to
2:24the help option, again, go to settings and
2:26performance and select stop
2:28performance recording. That's pretty much
2:30it. Now, Tableau will open up a workbook,
2:32which shows you a performance recording. So
2:34let's just wait for that to load. It
2:36actually loads it up on a different screen
2:38for me. So I'll bring it up here on the
2:40main screen and just wait for it to load.
2:42And we'll set it up full screen. Now, the
2:44tricky thing with this workbook is just
2:46understanding I need to do another video on
2:47this because I did do a video on
2:49performance recording. But I realize I didn
2:51't explain this clearly enough. So we'll
2:53definitely do that again. But nonetheless,
2:55you get two things out of this, you get
2:57this dashboard, which
2:58shows you an overview of all the different
2:59events, you can see here now while I was
3:01leaving gaps in between the different
3:02recordings, because you can see there's a
3:04there's a timeline here. And then there's a
3:06second dashboard, which is the detailed
3:07view, essentially, from top to bottom
3:10showing you all the activities that
3:11happened when you load the workbook. And
3:13each of those happens at different times,
3:15you can actually see the different gaps I
3:17created between the activities. So you can
3:19see this is the first time I open the work
3:21book, then there's another activity, then
3:23there's another activity, then there's
3:24another one. And then there's these two
3:26filter actions that I quickly clicked
3:28on at the very end, in quick succession. So
3:30I clicked on technology, and then I des
3:32elected the filter. So that actually did a
3:34did a little bit of a change to the way
3:36this is working. So it's kind of like an
3:38interesting workbook to sort of dig around.
3:41And yeah, we're going to try and get to the
3:43bottom of this. So if I go back to this
3:45workshop, this timeline worksheet, this is
3:46actually the most useful one. So what are
3:48we going to use for this analysis? If I
3:50open it up, it's just a classic dash
3:52boarding problem, you see, you've got a
3:54timeline going across the tops with start
3:56time. And you've got the
3:57different rows. Now the rows are structured
4:00in the structure of the workbook. But that
4:02's not what we're interested in, we want to
4:04just see the chronology of all the events
4:06as they happen. So what I'm going to do is
4:08I'm going to drag a few of these items onto
4:10the detail pane, just so that we can see
4:12them more clearly. And we'll go ahead and
4:14just put them on detail, I don't want to
4:16lose them completely from the
4:19visualization, because I think it's a
4:21useful sort of visual element to have, we
4:22'll just put it on, we'll just put
4:24everything on here, the event is already on
4:26the dashboard. So we can go ahead and
4:28remove that. And the start index is going
4:30to be good enough for me. So the start
4:32index is basically sort of that vertical
4:35timeline that you see. And now when I do
4:37that, you'll see that each of the
4:39activities is very, very clearly kind of
4:42broken down. And actually, if I, if I show
4:45you this, if I go from the top, you've got
4:47the initial sort of elapsed time from when
4:50I open up the workbook, and you go down,
4:52there's a bunch of things that happen right
4:54at the beginning. And then there's another
4:56bunch of things here. And if I move my face
4:57to the left, you keep seeing each of these
4:59activities. So each time I click on
5:02something, Tableau is doing something
5:04different. Now, the key
5:05thing is, I don't know what those
5:06activities are. So let's go ahead and
5:08actually do this. Let's bring the events
5:11back on. So let's put this here in the top
5:13right hand side. And you can see the events
5:15here are these events here. So passing,
5:17executing query. So let's go ahead and is
5:21it the event name that we want? Let's try
5:23the event, let's just put the event after
5:25the starting index. So yeah, we do have a
5:27slightly better sort of context here. And
5:29then I think the next thing I want is the
5:31worksheet. So let's go ahead, we'll keep
5:34the worksheet on
5:35there. But let's go ahead down here and
5:38bring the worksheet just after to see what
5:40's going on. So anything not related to
5:43worksheet comes up as null in the worksheet
5:46column. So you've got the passing, which is
5:49basically processing the workbook. That's
5:51what the XML essentially is based on. You
5:53've got the connecting to data source, you
5:55've got the query that runs. And then you've
5:57got the compilation of the query. So
6:00executing and compilation, I just think of
6:02them all as query activities. And then here
6:04, this is the
6:05secret answer, you're computing the layout.
6:07So actually computes the layout for
6:09furniture, office and the technology line
6:11as well. So it actually computes the charts
6:13. But interestingly, it doesn't say it's
6:16rendering them at all. So it computes the
6:18charts, which means it's doing all the
6:19calculations required for them. But it
6:22doesn't render them. At that point, there's
6:24a couple of rendering activities. Now,
6:26these aren't necessarily linked to a chart.
6:29So it's difficult to know if this is the
6:31rendering of the entire dashboards,
6:33including the hidden
6:34zones or not. So let's go down here, there
6:36's a computing layout. And this is basically
6:39the first time we click, there's a bunch of
6:41rendering, there's another computing layout
6:43, a bunch of rendering another computer in
6:45layout, a bunch of rendering another
6:47computing layout. So we don't see any other
6:50sort of query events, essentially. And so
6:54my gut instinct is that it's actually
6:56loading all of the different jobs in the
6:58background, it's computing the layout, it's
7:00doing the maths, loading the data set. And
7:03it's doing the rendering,
7:04but it's just not showing it. And so the
7:06when you actually switch between them, that
7:08's when it draws the shapes that you
7:09actually see. So it's doing all the work
7:11that it needs to, apart from rendering that
7:13visualization right in front of you. And
7:15then it's switching between the different
7:18tabs. That's what I think this is saying to
7:20me, I think that's what I think this is
7:21sort of coming to you. Now, it's really, it
7:24's really hard to be absolutely clear about
7:26that. And because some of these activities,
7:28you know, the way Tableau is built, I don't
7:30know how it's built. So I don't actually
7:31know all the quirks of sit behind some of
7:33this. But that's
7:34what this data seems to suggest. And what I
7:36what is interesting is all the query is
7:38done at the beginning, all the queries are
7:40being done in the beginning. So if you've
7:42got a new zone visibility, and you've done
7:44some nasty queries behind one of the sheets
7:46, it still looks like it's going to be
7:48loaded at the beginning, it's not going to
7:49wait until you activate the zone to sort of
7:51set it up. So that's my thought on this.
7:54That's what I think is going on. I'm going
7:56to ask tableau the question, and we'll try
7:58and put a semi official answer in the
7:59comments below. Once I get sort of a bit of
8:02clarity on that. But nonetheless,
8:04that's how you can sort of find out what's
8:05going on. And this might help you debug
8:07what's going on with the slow workbook.
8:09When you open it up, you can actually use
8:11this technique to go and find what's going
8:13on inside of a workbook and hopefully get a
8:15better perspective of what's sort of
8:17slowing you down what's taking time. This
8:19workbook was pretty fast. If I loaded
8:20something from a database, you'd see much
8:22bigger query sections as well. And don't
8:24forget, if you're if you want to see what
8:27some of these things look like. So if I go
8:29down here, for example, I want to see what
8:31the queries actually look like, I can click
8:33on the
8:33green query items, and it'll actually load
8:35the query here. So I can see the sequel
8:37that's actually being sent to the database,
8:39in case I want to debug that. So that's,
8:41you know, hopefully a really useful trick
8:43that you guys can use. But I just wanted to
8:45show you how I'd sort of come to that
8:47conclusion and how I'd find the answer.
8:49Hopefully you found that video useful. If
8:51not, let me know in the comments below,
8:52nonetheless, and I'll catch you in the next
8:54video. So you made it to the end of this
8:55video, I always add bloopers. And for this
8:57one, I think it needed context. So many
8:59times I record a video, maybe 234 times,
9:02and I'll
9:03basically reject every single version of
9:05that video until I get the version of the
9:07video that I want. Because as you know, a
9:09lot of my videos are done from start to
9:11finish for that very few cuts. So this is
9:13one of those rare videos, will actually
9:16show you the start and end of a previous
9:18take that I did. And there's always
9:20something funny that I do at the end of a
9:22take that I know I'm going to reject as
9:23soon as I started because I sort of get the
9:25feeling that the video is going to be a bad
9:27video. So I can I can really feel it. But I
9:30finished the video nonetheless, just for
9:32the
9:32practice of doing the video. And then once
9:35I get to the end, I always end up by saying
9:37, Ah, this isn't good enough. I cancel the
9:39take. And then I, you know, get rid of the
9:41clip. But in this case, this is what you
9:43see. Hey, it's Tim here. In today's video,
9:46we're going to answer a very, very brief
9:48question. What does zone visibility do for
9:51so it's a it's a little bit of a mindmaze
9:53to sort of explain everything. And I don't
9:54think I did a great job. So I'm actually
9:56going to record a second take of this video
9:58because this wasn't this wasn't good enough
10:00.
10:01[0]0
10:02Transcribed by https://otter.ai
10:02Transcribed by https://otter.ai
10:07[ Silence ]
Tableau release notes: Dynamic Zone Visibility allows you to show and hide objects automatically. This is ideal for dashboards that are used by different user groups. For example, you might want to show different user groups different zones when they visit your dashboard.
Join this channel to get access to perks: https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw/join