Work Items API performance Working group 2025-03-04 — Transcript
Full transcript
- 0:02cool yeah hey everyone uh this is a
- 0:05kickoff for uh work items working group
- 0:09um yeah let's just uh start Maybe by
- 0:14discussing why we need this or do we
- 0:17need this actually and how to best kind
- 0:20of organize the
- 0:22work
- 0:23um yeah so yeah let's start with like
- 0:26maybe motivations for every group in
- 0:29plan and kind of what we want to achieve
- 0:32and I see Nicholas you have the very
- 0:34first item oh yeah for the you mean the
- 0:38motivation part I mean for us it's very
- 0:41clear we want client side rendered
- 0:42planning views and the faster these work
- 0:46items can get the
- 0:48more larger higher limit will be so this
- 0:52is crucial um
- 0:55yeah yeah do you have like any specific
- 0:59uh like API end point or query that uh
- 1:03you want to
- 1:05optimize the BR items listing query um
- 1:09is the one that I would like to optimize
- 1:10for because it's the one that we need
- 1:12the
- 1:14most yeah is it uh is it like specific
- 1:18filters there or kind of what part of it
- 1:21could be any that could be a product a
- 1:23group or project one and any filters you
- 1:26can imagine so nothing specific okay
- 1:31okay junor you have the next one um yes
- 1:36I I wanted to mention I didn't say here
- 1:38but especially for some of the features
- 1:41of product planning since migrating from
- 1:43epic to work items we have found
- 1:45degradation we used to use rest and
- 1:49clearly now is when we're H putting in
- 1:51use uh loading widgets that can be quite
- 1:54slow or things like hierarchy that's H
- 1:58quite complex um especially
- 2:01authorization so we have a lot of
- 2:03problems there so anything that we can
- 2:05improve it would be a benefit this
- 2:08doesn't impact so much the listing but
- 2:10it it would come into play more when we
- 2:13have boards um ROP map definitely so
- 2:18yeah the more we can improve a single
- 2:21work item as well will help
- 2:33and uh did you was is the next Point as
- 2:36well uh
- 2:38go linked items
- 2:41Etc uh yes this is I was saying that
- 2:45specifically we have a few which is are
- 2:49um slower than others that have more
- 2:51impact H one of them is participants I
- 2:55mentioned that later we also have the
- 2:57the rollup H problems that Henrick
- 3:00mentioned as well H those are the
- 3:02slowest
- 3:04um queries when it comes to hierarchy
- 3:08also we have problems with linked items
- 3:11um this is also being loaded for listing
- 3:15so that's low in lising as well um so
- 3:19these are like the the highlights of the
- 3:21The Witches need
- 3:25attention Okay so it's mostly about the
- 3:28like widgets on the single work item yes
- 3:31yes uh that would be and and the way uh
- 3:35the architecture given that we return so
- 3:38much data when we load the widgets um
- 3:42and the
- 3:43authorization all of that has an impact
- 3:46as well so we have discussed um also we
- 3:49have front end problems of how we load
- 3:51the widgets but I think here we're going
- 3:53to focus on what we can do from the back
- 3:55end so any Improvement would help really
- 3:59okay
- 4:01Hinrich you have a next one for the
- 4:03project management yeah for the project
- 4:06management so we've previously owned
- 4:09like the everything issues right and
- 4:10we've dealt with this issu list problem
- 4:12for a while now and it's kind of a known
- 4:15problem where like group specifically
- 4:18group level lists are slow um because of
- 4:21how postgress like uh fetch needs to
- 4:24fetch all the data in memory and sorts
- 4:26them before we can get the first 10 or
- 4:28first 100 or first you you know however
- 4:31and so yeah and I think this is really
- 4:33important to fix because this is a basis
- 4:35for everything we're working on like on
- 4:37the save views and everything if the
- 4:38query times out all the endless one
- 4:40improvements don't matter um and yeah
- 4:44Alexandra also mentioned there about the
- 4:46group level work item so it's also a Q2
- 4:49or was it a Q3 tier 2 item which is the
- 4:54group level
- 4:55issues and project level epic so it's
- 4:58like kind of like you know you could
- 5:00create work items at any level at any
- 5:02for any type and so we need a unified
- 5:05list of um work items group level or
- 5:09project level so it makes this query
- 5:11worse with
- 5:12a yeah feature checks authorization
- 5:15checks there's lots of things going on
- 5:16in that career that just uh yeah we need
- 5:19to figure
- 5:22out yeah and that's actually a big point
- 5:25on the knowledge side as well uh for gql
- 5:30uh because yeah like we have those
- 5:32queries that time out for 15 seconds uh
- 5:36and just being slow in general I was
- 5:38wondering did
- 5:39you have any ideas in the past of how to
- 5:44address this group
- 5:46searches uh and make them significantly
- 5:49F yeah we had um several discussions
- 5:53around like
- 5:54uh partitioning
- 5:56data
- 5:58um we never really like did a deep dive
- 6:02and do like material like tests or
- 6:04something so it could be something we
- 6:06could do here um they were like uh using
- 6:09elastic search for
- 6:11searches and I think
- 6:14the global search team is also like
- 6:18involved in that uh they want the
- 6:19elastic search to have these like other
- 6:21filters right but on our end it's
- 6:25not like 100% the solution because
- 6:30I I'm not sure if it works for like just
- 6:32listing right listing give me the first
- 6:34100 like bu created that or something
- 6:36with elastic work for that or something
- 6:38I haven't really also so this is also
- 6:40one of the goals right figuring out if
- 6:42this is feasible or not like maybe
- 6:45spending some time talking with a global
- 6:47search engineer and you finding out so
- 6:50those are some of the things in my mind
- 6:52like that could help that you know we
- 6:54could
- 6:55explore yeah also like elastic search is
- 6:58not required on self-managed right um
- 7:01like not everyone is using El lasting
- 7:04search on self manag yeah there are
- 7:06those yeah there are those kinds of like
- 7:08constraints already but I think product
- 7:11also said before like it could be like
- 7:13an acceptable thing where you know it's
- 7:16on gitlab.com to help these large
- 7:19instances but not on self-manage but
- 7:21then of course it makes the code more
- 7:24complex uh supporting to code paths and
- 7:29yeah and we also have to make sure it
- 7:31helps with everything right like the
- 7:33counts counts on the sidebar these are
- 7:36the you know use the same base um SQL
- 7:40query and if elastic search only helps
- 7:43on a subset of them then you know it
- 7:45doesn't really solve the whole problem
- 7:47right so it might be better to go some
- 7:51other direction or something but
- 7:55yeah yeah cool maybe we should add an
- 7:58engineer from
- 8:00the uh Global search to those
- 8:03discussions as
- 8:04well uh I know just the person um cool
- 8:08on the knowledge side uh as I kind of
- 8:11mentioned yeah the biggest problem for
- 8:13us is those uh group high level group
- 8:17searches um especially if you had this
- 8:21like if you try to present something not
- 8:25super trivial but which has a lot of
- 8:27issues like when
- 8:30isn't equal to something then it just
- 8:32times out very
- 8:34often um and yeah we also need to like
- 8:37currently we're using the old uh issues
- 8:40API and it would be nice to migrate to
- 8:43the new work items so everything the
- 8:45other two groups add in was
- 8:48available um in gql as
- 8:52well so yeah
- 8:55um so yeah the next topic uh is just to
- 9:01synchronize on the kind of commitments
- 9:04and how much time do we time and effort
- 9:08we are willing to spend on this um yeah
- 9:11Nicholas you have a first item again on
- 9:12the planning side it's a bit of a chick
- 9:14neack problem so if we want client side
- 9:16rendering most of the work is on the
- 9:18front end and so it allows me on the
- 9:21back end to fully focus on the
- 9:23performance right to get to this limit
- 9:25if we do not get to a limit is
- 9:27reasonable most of the work is on the
- 9:29other hand on the backand side but yeah
- 9:31I I think I can since this is a Q3 Q3 Q2
- 9:35tier two commitment uh yeah I I'm
- 9:38definitely able to commit a lot of my
- 9:41time to this um as it's part of the
- 9:43planning views um
- 9:45yeah and yeah I think we wanted to I
- 9:49think everyone just started to discuss a
- 9:51few of the items that they are concerned
- 9:53about so far like what I looked into is
- 9:55like the band users thing that also
- 9:57chatted about the Hinrich ones we always
- 10:00for every query we check if no band user
- 10:02was the aor and if we denormalize this
- 10:04data on the issues table itself um which
- 10:08spares us this SE separate query that
- 10:10sometimes flips imp poess Henri did some
- 10:12work on this but still sometimes it's
- 10:14not performant and I know that the
- 10:17create stage did once a merch request
- 10:21where they started to denormalize that
- 10:22and they can could reuse this work for
- 10:24the merch requests um table as well uh
- 10:28then there are some n plus ones but I
- 10:30think eugia has more investigation there
- 10:31and the roll up data that HRI also
- 10:34started look into it and created an
- 10:41epic yeah just to add like for the
- 10:43rollup one it was like a known thing
- 10:46where we implemented the rollup stuff in
- 10:50a way that's color it's not optimal but
- 10:53it was at par with what we did with epex
- 10:55epex was not cach to and it was like
- 10:58computed on the fly but then this is
- 11:01definitely one of those like we should
- 11:02do you know uh we we know we did it that
- 11:05way but that's not like Optimal so
- 11:10yeah um on on my side I I was actually
- 11:14working on a few things in like a as as
- 11:17part of the Mone work when I can squee
- 11:20some performance things so part of me
- 11:23joining the joining the group was to um
- 11:26maybe focus on something that would be
- 11:28more significant
- 11:29and allocate more time to that so it
- 11:32would be maybe deciding
- 11:35um what could help the most and and put
- 11:38the time on it uh the moment I'm working
- 11:41on
- 11:42um investigating with which widgets
- 11:45could be improved one of them is
- 11:47participants and I have some work
- 11:49already that's basically finishing what
- 11:51was started a few years ago I think
- 11:53Henri was involved um so I think this
- 11:57would be a nice optimization but this is
- 11:59mostly for loading a single work item
- 12:02this is not about listing um then
- 12:06obviously we have linked H linked items
- 12:09that's a problematic one and that's
- 12:11affecting listing um so maybe I could
- 12:14focus on that as a start
- 12:17um and then more generically we have the
- 12:21child items uh but that's mainly
- 12:25affected by uh the slow widget as well
- 12:29so fix and slow widget would help this
- 12:34um so yeah that's what I I I've been
- 12:37focusing
- 12:46on y sounds good yeah I also mentioned
- 12:48there that the we're also working on
- 12:51Matt's working on the dashboard list uh
- 12:53right uh for work items and there was a
- 12:56discussion around like limiting it to
- 12:59items you participated with uh on
- 13:02because it's uh difficult to cry group
- 13:05level items globally like including
- 13:07public ones so it could help but you
- 13:10know it's not locking to work because
- 13:11you could we we were I think man
- 13:14mentioned other euristic or Nicholas uh
- 13:16you mentioned about like maybe checking
- 13:18assigned and authors first or something
- 13:20like that but it could be used for that
- 13:23type of work yes in this case it was
- 13:27particular about like we should not have
- 13:29a cre where you can globally on the
- 13:31whole gitlab instance search for all
- 13:33work items that are that exist and you
- 13:36could have potentially have access right
- 13:38it's an unnecessary Cy yeah which is
- 13:41what we currently do with my my work
- 13:44it's supposed to be my work but it's
- 13:45actually like a global yeah thing if you
- 13:48delete the default
- 13:52filter it's a global search without the
- 13:54global search
- 13:57team uh so on my side I've been doing
- 14:00some object uh trying to reduce some
- 14:03object uh allocation so I'm more focused
- 14:05on memory usage which doesn't bring too
- 14:08much performance Improvement on the time
- 14:10of the queries but at least it's
- 14:12reducing the number of objects loaded
- 14:14which at the end which is a little bit
- 14:16depending on how we filter the query so
- 14:19firstly we added the option to filter
- 14:21widgets on the back end now we have to
- 14:23implement that on the front end uh I
- 14:25know that some UI on the front end
- 14:28doesn't require all the widgets so this
- 14:30might bring some improvements in there
- 14:32also some up dates might improve uh
- 14:35might leverage from that so when we
- 14:37upate just one widget we can filter to
- 14:39just get the return of that widget so we
- 14:41don't have to load all the widgets when
- 14:43we are building the response or at least
- 14:45load them in memory before building the
- 14:47response itself uh so yeah that's done
- 14:49on the back end we need to implement on
- 14:50the front end I have a merriage request
- 14:52that I start doing with Natalia maybe
- 14:53I'll pair with her later on the week to
- 14:55try to implement in more places besides
- 14:58that that uh I'm also trying to reduce
- 15:01the number of redact objects that we can
- 15:03do on a query so there is just a little
- 15:06uh condition that was done later in the
- 15:11query so we were creating one object for
- 15:14each type of a query and uh we can
- 15:17actually reduce that by checking if that
- 15:20type requires a redact object before
- 15:23initialization initializing that object
- 15:25so that also might be bring a little bit
- 15:27of an improvement on memory usage at
- 15:29least uh I'm finishing that and so after
- 15:32the this later this week I might start
- 15:34helping with the more database oriented
- 15:37improvements which really will bring
- 15:39more uh time uh Improvement for the the
- 15:43response of the APN so that's
- 15:46me quick question what is the reduct
- 15:49object uh it's an object that would
- 15:52remove uh nodes of the query that you
- 15:56don't have access to so because graphql
- 15:59is built on nodes and edges and each
- 16:02node or or Edge can have a type and we
- 16:04have authorization per type so when we
- 16:06build the query for the graphql maybe
- 16:09some of the nodes might not have you
- 16:11don't have authorization so we reduct
- 16:13them from the response but like if that
- 16:16that type doesn't have an authorization
- 16:18we don't have even to create that object
- 16:20to reduct the query so that's where I'm
- 16:23trench would bring a little bit of
- 16:24improvement in there yeah I think that's
- 16:26the big difference between graphql and
- 16:29rest where in rest we do all of the
- 16:31authorization and whatnot prior to
- 16:34presenting everything whereas in graphql
- 16:38we we're sometimes doing it at the
- 16:40service level but also on on every
- 16:43presentation level basically every every
- 16:46type would run the authorization again
- 16:48on on the object instance of that
- 16:52specific type and so on so I think that
- 16:54does add quite a bit of a overhead at
- 16:58least that's from some of
- 17:00my debugging like resulted as well on
- 17:04like on on the pogress side it was misec
- 17:06seconds but the whole request was taking
- 17:09seconds because it was doing all of
- 17:12these authorizations and then a lot of
- 17:15um objects created that needed to be uh
- 17:18garbage collected and so on yeah and
- 17:20honestly I never understood why we do
- 17:22that because like as you said we already
- 17:24use this basically the same servers and
- 17:26Finders on rest so we already do
- 17:28authorization in there but we also do on
- 17:31graphql for some reason so it's not very
- 17:34clear to me if we really need to do on
- 17:36both sides maybe we should try to have
- 17:38an effort to move all the authorization
- 17:41to closer to the database and remove
- 17:43from the API level I think just on the
- 17:46entry level to simplify some stuff but
- 17:49that's another job for later yeah the
- 17:52graph Q type authorization is basically
- 17:55due to the this graph thing right where
- 17:58type could be used in multiple places
- 18:01and so it's like a more a defense in
- 18:05depth thing where you know if it's an
- 18:08issue we do read issue for every issue
- 18:11object we serialize right which is kind
- 18:13of a waste but then it also protects us
- 18:15if you do like a issue relation
- 18:17somewhere in some object and so we don't
- 18:20expose them and
- 18:25uh yeah it it's complex it's a very
- 18:28complex I agree Alexander you did one
- 18:32optimization for notes right where you
- 18:34on the type can check like if it it's
- 18:37coming from somewhere where it's already
- 18:40authorized yeah eugia
- 18:43you yeah typing this I uh I did that
- 18:47that skip type authorization where if
- 18:49you know that it's already checked in
- 18:52the service layer you can you can
- 18:53basically say from here downwards don't
- 18:57check this permission cuz we know it's
- 18:59already checked kind of
- 19:03thing yeah I didn't test H the the
- 19:06difference in performance but this is
- 19:08something we could do um unfortunately I
- 19:11was relying on this on the work I'm
- 19:13doing for project epics um but if we
- 19:17decide to remove the type authorization
- 19:20I can just start filtering the the Epic
- 19:23out some other way because we need to
- 19:25check that the Epic um features is
- 19:28available that the feature flag is
- 19:30available so I was relying on this
- 19:33second authorization uh but if we remove
- 19:36it I will find another
- 19:39way if it's an improvement in
- 19:41performance I think it's an easy fix
- 19:44something we can
- 19:46try yeah but also like for lists type
- 19:49authorizations will will also um mix up
- 19:54with the pagination right um because
- 19:57like if you if you're
- 19:59something uh from the service and then
- 20:02you start removing it at the type level
- 20:05you loaded like 100 items but now you
- 20:07only show 10 or however many um that
- 20:11authorization so it's kind of I like
- 20:13from my perspective it's always best to
- 20:16move it left or as left as possible
- 20:19right and and then and not do it on the
- 20:21presentation later but yeah I don't know
- 20:31uh Henrik you have a next one on the
- 20:33project management side yeah um yeah
- 20:36it's basically what I said earlier like
- 20:38um focus I think for project management
- 20:40could be the poster side and there's
- 20:43also a tech Deb here like um like
- 20:46Alexander mentioned the namespace ID
- 20:48project ID thing I think it's
- 20:51a currently the work items finder I
- 20:54changed it to use a namespace ID if you
- 20:57create like group level
- 20:59items and but then if you like switch to
- 21:01project level items it uses the um old
- 21:05query which filters by project ID and so
- 21:09if we can clean up that Tech Deb to
- 21:12always use namespace ID for
- 21:14any uh level query it EAS eases the
- 21:19performance or the performance
- 21:21optimization we only need to look at
- 21:23this one type of query right right right
- 21:25now there's so many variants of the
- 21:26query and um so yeah yeah I think that's
- 21:30something that I'll be looking
- 21:32into uh from
- 21:35from down from here on like I think um
- 21:38Donald asked me to look into group level
- 21:41uh work items basically group level
- 21:44issues and so on so I'll I'll start
- 21:46working on some of this refactorings and
- 21:48and replacing the usages of project from
- 21:51from
- 21:53issues we can also add a cby on the
- 21:56namespace type itself because I think
- 21:59right now the front endend we create
- 22:00group or project and then all the work
- 22:03items from that I think we already have
- 22:05that right uh maybe I didn't find
- 22:10then but even if we don't if if we are
- 22:13on a project level all we need to do is
- 22:15change a little bit the resolver I guess
- 22:17so that it if if you're passing in the
- 22:19project you're passing the project nice
- 22:21pH so if our finders if our services
- 22:25will will will be able to work with the
- 22:27namespace then and well like the the
- 22:30graphql can be very easily changed and
- 22:33it it can also be very transparent to
- 22:35the frontend they they should not even
- 22:37feel
- 22:44it um yeah sorry go ahead yeah and I
- 22:49wanted to STI point my did you have
- 22:52anything on on hr's point because if not
- 22:54I'll verbalize M no I think that's fine
- 22:56it's just I just posted the link to the
- 22:59yeah so detail but not the listing one
- 23:03now um so yeah I kind of agree I think
- 23:07the the pogress query is something that
- 23:10will be the challenging part um because
- 23:14we have a lot of the filtering that
- 23:16needs to happen and I don't know if hinr
- 23:19already looked
- 23:21at or not add even more
- 23:25um challenges to
- 23:36performance and I think Alexandra's gone
- 23:51yeah yeah let's maybe move next to the
- 23:54agenda and we come back to this once
- 23:57Alexander oh yeah am I back yeah I have
- 24:01yes you
- 24:03are partially
- 24:19though okay uh I'll quickly verbalize
- 24:22for knowledge and maybe Alexander will
- 24:24connect uh so yeah on our commit
- 24:28currently we're working on
- 24:30the a little bit tangentially related
- 24:32stuff for gql performance and
- 24:35reliability uh it's not directly
- 24:37improving any of the API but next uh
- 24:41we'll have more things uh more related
- 24:45which is uh adding filtering for epics
- 24:48showing epics themselves so working on
- 24:50the work items uh transition into the
- 24:55work items uh API and then we also have
- 24:58this
- 24:59uh group search which we are still very
- 25:01much interested so uh I think we'll be
- 25:04happy to contribute there uh some
- 25:08capacity sorry Alexandra I moved to the
- 25:11next point but we can yeah no no worri
- 25:13is I mean it's pretty much what I wrote
- 25:15there like there are two things that we
- 25:17need to and the the posg quy
- 25:19optimization is basically the most
- 25:21challenging part I would say uh CU there
- 25:23are many many ways we can filter by and
- 25:26um it will be a tough one I think we'll
- 25:29need to the the change of the indexes is
- 25:32is the simple one that we can get very
- 25:34fast to um but then we'll need to see
- 25:37how can we maybe denormalize some of the
- 25:39data so that when you query from a very
- 25:42high level group you you can
- 25:45optimally know which groups actually
- 25:48contain issues or don't contain issues
- 25:50and stuff like that so yeah it will be
- 25:53that'll be one of the from my
- 25:55perspective the very challenging Parts
- 25:57too maybe we can pull in some database
- 26:01um experts as well in in in this that
- 26:04can advise us how can we denormalize
- 26:06this data given the requirements that we
- 26:09have to to query from the top down right
- 26:13um so
- 26:16yeah yeah also I'd like to add like the
- 26:18query postgress query planner is also
- 26:21like one of the challenging parts right
- 26:23where plans could flip depending on
- 26:25statistics and like so it's hard to make
- 26:27it like a
- 26:28stable thing it could time out for
- 26:31certain scenarios so we need to test it
- 26:33on like different kinds of hierarchies
- 26:36different kinds of projects or groups
- 26:38with different number of issues
- 26:39different filtering different there are
- 26:41so many combinations
- 26:48so I I I don't think that this is
- 26:51something product will agree but rather
- 26:54feel even more against it but like I was
- 26:57wondering because quering from the
- 27:00higher level groups um is so much less
- 27:05performing because you have to look now
- 27:07in a lot of more nodes right the three
- 27:10expands um dramatically from just one
- 27:13node downwards is like to reduce some of
- 27:17the
- 27:18filtering or sorting capabilities right
- 27:22because that also influences but yeah I
- 27:24don't I don't think that's something
- 27:27product will agree with
- 27:28uh it's just maybe maybe that's where we
- 27:32can start so that we can
- 27:34have uh a a decent performance to fetch
- 27:39a list of queries but then um add more
- 27:43on to that right so that that's just
- 27:45kind of along the lines of what I'm
- 27:46trying to think if you think that we can
- 27:50give me uh this list of work items for
- 27:53these labels and then I can do some uh
- 27:55filtering on the frontend side right
- 27:57that that kind of feels a
- 27:59bit like you'll Lo the first list pretty
- 28:02fast for those 5,000 or whatever items
- 28:04but then on the front end the filtering
- 28:06will go uh much smoother than having to
- 28:09do this full quering but yeah I can
- 28:12understand as well if if that's not what
- 28:15we
- 28:21want
- 28:23that's sorry go ahead yeah that sounds
- 28:25actually very much related to what uh
- 28:28Nicholas uh was discussing yesterday and
- 28:32like on the road map sync this idea of
- 28:37containers and uh having sort of a not
- 28:42just Global Group searches but some more
- 28:47limited uh in like I don't know
- 28:51containers again for work so you don't
- 28:53have to
- 28:54query so I I like that idea the the the
- 28:59problem still I think boils down to how
- 29:02do you build those containers right like
- 29:04in order to build those 5,000 items you
- 29:06still need to filter some way to to get
- 29:10those lists of like once you have them
- 29:12explicitly listed like you have explicit
- 29:145,000 or 10,000 IDs those can be quered
- 29:18pretty easily and and quite fast I would
- 29:20think um the problem is how do you get
- 29:23into those
- 29:24containers from my perspective but yeah
- 29:31cool uh yeah Nicholas you have an next
- 29:34one uh yeah so my idea is like that we
- 29:38so one problem that we currently facing
- 29:39at least with the work item listing
- 29:41query is that we do not use it anywhere
- 29:43in production yet so I think we can only
- 29:46rely on manually tracking this um and my
- 29:49idea is like
- 29:51let's have a baseline that we currently
- 29:53track and then every week and after
- 29:55every Improvement that we look at like
- 29:57we manually track this again until we
- 29:59have it in production and then we can
- 30:02track it globally so we could find a few
- 30:05groups uh and projects run the crey
- 30:08there I just tried it today like with G
- 30:11or it takes like six seconds to crey 100
- 30:13items um so it's a group cre very not
- 30:16performant on the project it's a bit
- 30:18better but still lot of n plus ones and
- 30:22one of the biggest problems with I think
- 30:24H mentioned is the group crew is not
- 30:26performing at all like the
- 30:29crey alone for getting all the work
- 30:31items on the issues table is like 6
- 30:33seconds so that's that's a lot and yeah
- 30:38we can just use this and manually
- 30:40trigger it and check like what's the
- 30:41performance now and how it didn't
- 30:42improve over the weeks that's my
- 30:45recommendation and maybe have a target
- 30:47of like in within half a seconds we
- 30:49should load 100 items ideally it should
- 30:52be lower but that's wishful
- 30:55thinking it's already 10 10x
- 30:59if you would achieve
- 31:02that there's also the filters right so
- 31:05there's probably like a sample list of
- 31:08filters like good point
- 31:13yeah I hope I think Consolidated lists
- 31:16will happen in next Milestone and then
- 31:19we should see production usage as
- 31:25well I wonder yeah
- 31:28go ahead answer s yeah yeah with this
- 31:31kind of performance if listing 100 items
- 31:34take you six seconds will the
- 31:36Consolidated list happen in the next
- 31:39Milestones or it will be like we'll try
- 31:41to roll it out and we'll roll back it
- 31:44immediately I'm not sure if anyone has
- 31:47it on their radar I mean I know we I
- 31:50think that's one of the reason why kasio
- 31:51started it work on the performance right
- 31:54um but that we want to roll it out next
- 31:57Milestone that's still such a
- 31:59performance I think is
- 32:01not like I'm not sure if there's a point
- 32:04where not sure about management if you
- 32:06know that we should not or will not roll
- 32:08this out with the current
- 32:13performance so uh who's working on this
- 32:19uh consolidated uh work item
- 32:24list from the Jack Jack yeah yeah
- 32:29but he's working on the front end right
- 32:31some back end it's mostly just it's
- 32:34mostly front end work yeah it's just
- 32:36like navigation and fronted work and
- 32:38using a new quy new quy is not
- 32:39performant so it's going back to us as
- 32:42backend Engineers okay and who is there
- 32:46a single person responsible for it on
- 32:47the back end or not I I guess it will be
- 32:50me uh if I'll be starting on to group
- 32:54level or items I'll probably have to
- 32:56dive into that anyway I didn't start
- 32:58that yet so I'm not I'm not exactly sure
- 33:01what needs to be done there but um I
- 33:04think I'll be one uh going on with that
- 33:07yeah I've spoken to Donald about this so
- 33:09it's probably our team that's going to
- 33:11get this and like because it like
- 33:14Alexander said it's part of the our tier
- 33:17to item around the group level work
- 33:19items and I don't know if Donald has you
- 33:21know explicitly allotted the engineer
- 33:24time or whatever but it's definitely I
- 33:27think on our
- 33:34radar okay
- 33:37um yeah I like setting this up as one of
- 33:41the goals uh so just to uh make sure I
- 33:47understand it right uh Nicholas when you
- 33:49say uh 6 second for 100
- 33:53items this is not including any complex
- 33:56filtering it's just a just this just G
- 33:59or first one work items yeah okay can
- 34:04yeah on to that actually CU it'll be
- 34:07very complicated to make it work for
- 34:10every single type of filtering I would
- 34:12imagine I wonder if we can sync up with
- 34:15product and say all these things like
- 34:17filtering by label as sign and I don't
- 34:19know as like the top of the mind and
- 34:23then maybe we can we can either let a
- 34:26timeout or in some cases not as
- 34:28performant or maybe even remove it from
- 34:29from capabilities right but like there
- 34:32there must be something that we want to
- 34:33filter by that is very very up there
- 34:36right like that will not bro break every
- 34:39single workflow maybe it's everything
- 34:41ideally not but but I don't know like
- 34:43that will be not something that will be
- 34:46nice to sync up and say well maybe we
- 34:48can remove this capability or this other
- 34:51one so then we shwing down the amount of
- 34:54work that we need to do in order to get
- 34:56that out and to get it to
- 34:59um an okay Place
- 35:03basically just based on experience
- 35:05though is like adding a
- 35:08filter most of the time actually makes
- 35:11it faster because postgress in this case
- 35:13like starts with that list of filtered
- 35:17issues by um label ID or something which
- 35:21is a much smaller list versus going
- 35:22through all the issues of this project
- 35:24or group so in in many cases it helps
- 35:28although sometimes in with multiple
- 35:30filters with ores or whatever it also
- 35:33slows down
- 35:34so that and also I think you correct and
- 35:38I think what adds to the time is a lot
- 35:41of the time is the ordering like if you
- 35:43need to then sort also then then it
- 35:47needs to scan everything anyway because
- 35:49it needs to put it into a specific order
- 35:51and and only then filter out the items
- 35:54that don't match the filtering so it it
- 35:58makes it so maybe it's not the filtering
- 36:01per se but maybe maybe less ordering I
- 36:03don't yeah that that's something that I
- 36:05can take out and and see what we want to
- 36:08maybe remove or consider less options
- 36:13of yeah actually this is like a like we
- 36:15even have a Doc Page for this I can link
- 36:17it to it later like Adam heggy like
- 36:20wrote this whole like in operator
- 36:22optimization right and describes this
- 36:24problem with group level issues where we
- 36:28do namespace ID in you know a list of
- 36:32namespace IDs or project ID in like a
- 36:34list of project IDs you can't do the
- 36:36Sorting the post has to get everything
- 36:38and sort them in memory and
- 36:40like in operator optimization is a
- 36:45option I considered before but then it
- 36:48doesn't help for account queries it
- 36:50complicates the code a lot and like so
- 36:52we need to find a way to do it without
- 36:55or you know and doesn't work every time
- 36:57yeah I wonder though for Discount
- 37:00queries can we set up
- 37:03a number Beyond which it just doesn't
- 37:08make sense to count because like if I
- 37:10say I have 5,000 items plus do I care
- 37:15that it is 5,900 where it's like I I
- 37:19don't know can we say 5K plus and that's
- 37:21it uh cuz then what we need to do is say
- 37:25get me first item offset it by 50001 if
- 37:28it's more then we have more if it's less
- 37:30then you uh try and query basically the
- 37:34the count total right or whatever number
- 37:36like the lower obviously the the better
- 37:38but um I don't know just just wondering
- 37:41if that's I think we had the discussion
- 37:44some time ago um but then again like
- 37:48maybe we can we can low it down and then
- 37:51maybe we can have some sort of way a
- 37:53sync way to increment it to say instead
- 37:56of 5,000 it's say 10,000 plus and and so
- 37:59on and so forth um rather than exact
- 38:06counts I thought I was muted before I
- 38:09would definitely do this uh we did this
- 38:13with CI job we do this with CI jobs a
- 38:16lot where we just show a thousand plus
- 38:19pipelines uh especially on the instance
- 38:21level where it's not feasible to count
- 38:24them at all uh so yeah yeah 1,000 5,000
- 38:3010,000 makes sense not
- 38:32to like enumerate every single issue in
- 38:35the database yeah especially that we
- 38:38don't have numbered pagination these
- 38:40days is like it's kind of make it a bit
- 38:44easier because you don't need to know
- 38:46how many pages you have and so on so
- 38:48like you don't have this mismatch in in
- 38:50conception where you show 10 pages but
- 38:52you actually have like um only a th000
- 38:56items or something like that I don't
- 38:59we we use something like that for the
- 39:02sidebar where if it's more than a th000
- 39:06we start rounding it and so we cash it
- 39:08but this is not used for the tabs so
- 39:10when you go to the tabs open um close
- 39:14those are using filters H and the
- 39:17service the the count service that does
- 39:19the caching and the H rounding it that
- 39:22doesn't work when it's not C when we
- 39:25have filters so so those tabs if you go
- 39:29now to gitlab or to epics you see the
- 39:32exact number in each Tab and is immens
- 39:36so I think I think we remov this in a
- 39:38new design if I'm yes I think this the
- 39:41design is uh is two tabs but I don't
- 39:44remember what they uh I mean it's the
- 39:46Epic I think it's the Epic and the issue
- 39:48tab
- 39:50cutoms no more counts there's no more
- 39:52counts anymore it's just like the filter
- 39:54with status open as the default tab like
- 39:57it's not it's default filter and then
- 40:00you do no longer CD other accounts for
- 40:03all and closed yeah but there's still
- 40:06one count right and this is also for the
- 40:08save views for the future is there's no
- 40:10more tabs right yeah correct yeah I'm
- 40:14I'm thinking like maybe more globally
- 40:16right like because even if you if you
- 40:18have for
- 40:19instance 100 child items do you really
- 40:22care that it's 100 or it's 59 or it's 60
- 40:25like can you say or like more than 100
- 40:27you say 100 plus and that's it I don't
- 40:29have to pull a account for everything
- 40:32cuz if
- 40:34we trickle it down to the work item
- 40:37hierarchy now you can have the same
- 40:39problem like one one Epic can have I
- 40:42think 5,000 direct children and then
- 40:45those can have up to 5,000 uh sub
- 40:48children and so on So in theory that can
- 40:51grow pretty large as well and doing a
- 40:54account like that is also like expensive
- 40:56so like I wonder if that should be or
- 40:58can be some some kind of a more holistic
- 41:01approach all over plan at least if not
- 41:03all over gitlab where we'll have some
- 41:06count limits and if if it's over that we
- 41:08just don't display that number anymore
- 41:10we don't care to run the query to count
- 41:13things we actually have that like
- 41:15concern or like a mod concern or module
- 41:19or something for our API um limited
- 41:22cting so in our rest apis we have this
- 41:25like X total pay just header or
- 41:28something and we already have code in
- 41:31place where if it if the count so it's a
- 41:34limited count it's a count query with a
- 41:35limit 10,000 or something and if it goes
- 41:38over that limit then we don't return
- 41:41that header so we have like previous
- 41:43work that does this kind of thing
- 41:46cool yeah uh we only have like five
- 41:49minutes left so I want to have a kind of
- 41:53good action items list for the next one
- 41:56uh and and it sounds like there is a
- 42:00there are a lot of different problems
- 42:01all over the place so maybe we what we
- 42:04should do now is just uh focus on
- 42:07establishing the
- 42:08Baseline uh for this week kind the
- 42:11queries that we really want to optimize
- 42:12what is the current performance where we
- 42:14want to get I like the suggestion from
- 42:19Nicholas uh for the work item
- 42:22stuff uh
- 42:25what like uh
- 42:28what other
- 42:30queries do you think like if every one
- 42:33of you can uh name just one thing uh one
- 42:37query what would it be at this
- 42:41point okay can we be specific about the
- 42:44Nicholas's one is that related to group
- 42:47and project level work items just bear
- 42:50that that bear qu yeah the point number
- 42:53four yeah
- 42:59for me it would be these two queries I
- 43:01mentioned the initial queries for
- 43:03project and group level on gitlab or
- 43:06gitlab or
- 43:08gitlab in addition I would like to track
- 43:11it as a signed in and as signed out like
- 43:13as an anonymous user because there are
- 43:15differ difference in performance
- 43:17something we need to consider because
- 43:19the the group level always times old
- 43:22right now if you're not signed in or I
- 43:23don't have a membership with klb work
- 43:26yeah it was about say that uh the
- 43:28difference between having a membership
- 43:31and not having a membership and not
- 43:33being signed in it's very different it's
- 43:35three very different scenarios I would
- 43:37focus on that as
- 43:40well cool but this is a work items query
- 43:44do we want to focus also on the current
- 43:47issues API at
- 43:50all they use the same underlying thing
- 43:53so it should be pretty like reusable or
- 43:56whatever the fixed would be like they
- 43:58use the same finder so it's the same quy
- 44:01and
- 44:02yeah unless there is a problem with the
- 44:04authorizations on graph P do do we have
- 44:08to focus on the issues uh listing page
- 44:11at the group level given that we want to
- 44:14work towards the
- 44:16unified page I mean if we get to get it
- 44:20to
- 44:21work uh for all work items we should not
- 44:25have to move back to the issues at the
- 44:28group level
- 44:30and if we don't make it works for the
- 44:34worse for the issues group level as it
- 44:35is already we are not breaking anything
- 44:37so I don't know if we need to split our
- 44:40um capacity to that but maybe there is
- 44:43something I don't
- 44:44know yeah I agree from my perspective I
- 44:47would focus more on work items and stuff
- 44:50than Legacy issues or
- 44:54whatever okay do so does this so like
- 44:59currently we have these uh queries
- 45:02for uh just top 100 work items on the
- 45:07work items
- 45:08API uh we have
- 45:11filtering uh which we need to ask for
- 45:15kind of either get it from product or
- 45:17maybe look into the logs to see what's
- 45:19the most frequently
- 45:22used uh
- 45:25stuff do we want to focus on anything
- 45:28else at this moment or these
- 45:30two
- 45:32queries uh will help with everything
- 45:35else kind of by default because we
- 45:36optimize the finders and database etc
- 45:39for me the the widgets focus on a couple
- 45:43of slow widgets because they're
- 45:44definitely loaded by the
- 45:47list uh even if when when there's no
- 45:49filters
- 45:52so um I will say linked items maybe is
- 45:57the first one uh I would like to tackle
- 46:01uh
- 46:02participants and rollups I don't think
- 46:05it will affect listing I don't think
- 46:07they we use it there we use it for
- 46:09hierarchy so rollups is a is a nice to
- 46:12have but maybe not not the first the
- 46:15first I think could be linked
- 46:17items uh and then participants
- 46:27anything
- 46:29else yeah I was I was thinking in
- 46:32general uh what was what Casio was
- 46:35looking like is there anything to be
- 46:37extra to be gained on the graphql on the
- 46:40graphql side right is there anything
- 46:43that we can especially when we talk
- 46:45about lists there is probably something
- 46:49that we can we can improve in terms of
- 46:52permissions and and so on and so forth
- 46:55like maybe I don't know I will just say
- 46:58it but like like read issue do we need
- 47:00to do read issue on every item or can we
- 47:02move it to the namespace level itself
- 47:04right maybe maybe not there is some
- 47:06confidential issues and so on so those
- 47:08will need to be checked separately
- 47:09probably but if we check if the user has
- 47:12confidential issues reading at the
- 47:14namespace level then maybe we don't have
- 47:16to do that check on every single every
- 47:19single archem so like try and and sift
- 47:23through the uh permissions that we are
- 47:25already
- 47:27um checking maybe there is some
- 47:29optimizations on on that in terms of
- 47:31list and not checking on every
- 47:35item okay uh can we then just uh split
- 47:39this work and go into
- 47:42the uh work like I'll create a threat on
- 47:46the work items working group uh issue
- 47:50and just set a baseline so Nicholas you
- 47:53can collect those uh two queries per
- 47:56performance you listed
- 47:58above
- 48:00uh I question do can you also take as an
- 48:04action item talking to product about the
- 48:07filters and what is the most
- 48:10important for Alexandra you mean or for
- 48:14me any uh I meant you but okay take
- 48:20it uh although it's also kind of
- 48:22dependent on our research on what you
- 48:25know product make a decision and this we
- 48:28also tell them like which filters make
- 48:29the query slower or you know or not
- 48:32right so it's hard for to get a decision
- 48:34there without more more
- 48:40data how many options do we currently
- 48:42have though at the group level updated
- 48:44by and
- 48:46created and then there is title I I mean
- 48:49can we remove sorting by title for
- 48:53instance like is it really sorting by
- 48:57that we will ask for will be a fight
- 48:59that we to remove yeah but like
- 49:02currently at the group level as far as I
- 49:04H is it on epics as
- 49:06well like it's is it sorting by like I
- 49:10think sorting by title can maybe moved
- 49:12into front end once we get there like
- 49:15you can you can then reorder them to
- 49:18whatever but I I don't know I'm just I'm
- 49:21not sure if we should approach this from
- 49:25perspective like can we remove this that
- 49:28as uh like any filter any sorting as
- 49:31Nicholas said it will be a fight to kind
- 49:33of remove it from the product but what
- 49:36we can do is ask what is the most
- 49:37important and focus on optimizing those
- 49:40parts uh so kind of included in this
- 49:43Baseline that we
- 49:45measuring uh so yeah at least things
- 49:49that are more important are performing
- 49:52well
- 49:53enough uh and then we can go back to the
- 49:55discussion of I don't think we have any
- 49:57way to know that from our logs right I
- 50:01don't think there is an easy way to to
- 50:04know they
- 50:07have in the API you see in which how how
- 50:11these issues right now get ordered by
- 50:15and if you can provide them with like
- 50:17okay 90% of the issues are ordered by
- 50:19created ad well that's all
- 50:22optimization it's also tricky because we
- 50:24do the store in the DB your last filter
- 50:27so even without the param it uses your
- 50:29last uh so but I think optimizing cread
- 50:33ad is like the number one priority right
- 50:35now because even that even just that the
- 50:37default sort is already slow so and
- 50:39maybe the fix for that would fix others
- 50:42or something right so we don't even need
- 50:45about that yeah in my opinion the action
- 50:46item is not check with with product but
- 50:48get the metric and because product will
- 50:51check ask us like what are the metrics
- 50:53and we will instead of asking um data
- 50:56analytics we will just get it ourselves
- 50:58um yeah yeah great and then Eugenia uh
- 51:04for you to also can you establish the
- 51:05Baseline for the widgets that you were
- 51:08talking about should we measure it with
- 51:11the 100 items query like Nicholas use
- 51:14something like that
- 51:17uh uh I mean you were talking about the
- 51:21couple widgets that you want to optimize
- 51:23just get the qu just a single one
- 51:27okay
- 51:29yeah just like I don't know uh go if
- 51:33it's used as I understand it's already
- 51:36used in
- 51:37[Music]
- 51:38the product right so we can just go to
- 51:41kibana or uh yeah maybe even dashboards
- 51:45and see how it's
- 51:47doing um or maybe not if it's just one
- 51:51field in the query but um I'll leave it
- 51:54up to you how exactly
- 51:57it's best to measure
- 51:58those um and then Alexandro can you take
- 52:03on this
- 52:05uh or maybe Casio uh the permissions
- 52:08check on the uh graphql site versus
- 52:12finders yeah I was going to focus on the
- 52:15queries well Focus try and understand
- 52:18the queries as well since I'm going to
- 52:20work on the group level or items but
- 52:22yeah I can also take the the graphql or
- 52:25C can take like whatever I I don't mind
- 52:27either way yeah I was planning to do the
- 52:31the check on the difference between the
- 52:33logged in and not logged in and
- 52:35membership and not membership which will
- 52:37be intersective with this work so maybe
- 52:41I'll do a check focus on that part and
- 52:44Alexander can do a more broad gen uh
- 52:46check and we can
- 52:49sync okay take the
- 52:51permissions go ahead yeah one thing I
- 52:54was actually planning to do was to map
- 52:56out what our um finder does so I've
- 53:00worked a lot on it and I I I think I
- 53:03can present it in a way I'm still
- 53:06struggling I'm still trying to think how
- 53:08but like like a flowchart thing or like
- 53:11how the finder decides what to do or
- 53:13what it does like filter by groups with
- 53:15permission first or something and then
- 53:17once we get that document or chart maybe
- 53:19it's easier to discuss which parts we
- 53:21could you know optimize take out or just
- 53:27all right uh yeah that sounds also uh
- 53:29like an awesome idea so for the next
- 53:32time we uh kind of establishing the
- 53:35Baseline uh and Henrich starts to look
- 53:38into the finder everybody else also like
- 53:42not just establishing the Baseline but
- 53:44if you can look into what's the biggest
- 53:47optimization there can be uh it will be
- 53:50nice uh my last do you have anything
- 53:54that you're interested in
- 53:57sorry did you address me uh oh yeah if
- 53:59you have anything that you're interested
- 54:01in working as part of this yeah so far
- 54:04if like I understood everything
- 54:05correctly um subgroups is something that
- 54:09is relevant for gql like fetching issues
- 54:12merch request from uh nested groups uh
- 54:15might be a big performance bottleneck so
- 54:18I just wonder and I understood that
- 54:19there is quite some intersection from
- 54:21what you're going to do for work item so
- 54:23I wonder if there's yeah some actionable
- 54:26uh for our team in terms of jql and work
- 54:29items subgrouping small first thing to
- 54:32do to start investigating
- 54:38that I don't have an opinion uh maybe
- 54:42since Nicholas is working on kind of the
- 54:44most generic uh scene right now
- 54:48uh Nicholas feel free to ask Alisa for
- 54:52help include her and those things
- 54:54perfect sounds good yeah yeah yeah yeah
- 54:56that's that may be a good idea to also
- 54:58give me some uh overview and and maybe
- 55:00it'll give me some ideas how this can be
- 55:03uh yeah implemented for our use
- 55:06cases perfect uh my final question is
- 55:09weekly Cadence works for
- 55:13everyone so next time same next week
- 55:16same time yeah let's let's do weekly and
- 55:19then we can reconsider if we we need
- 55:21more
- 55:21time cool all right uh thank you all for
- 55:25your time I think it was a really good
- 55:27discussion uh hope we can actually
- 55:29improve uh stuff and yeah I'll capture
- 55:33uh the outcomes and to do on the issue
- 55:36ping all uh yeah otherwise have a great
- 55:39rest of your day thanks everyone bye bye
- 55:42thank you bye-bye
About this transcript
This page contains the full transcript of Work Items API performance Working group 2025-03-04 by GitLab Unfiltered, generated from the public captions YouTube serves with the video. The transcript has 8,404 words across 1,186 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.