[Tile-serving] [openstreetmap/mod_tile] Improve lock contention in render_list etc (PR #335)
Paul Norman
notifications at github.com
Thu Sep 21 07:53:10 UTC 2023
@pnorman approved this pull request.
My estimate based on [gdb](https://github.com/openstreetmap/mod_tile/issues/333#issuecomment-1724292120) is that 5% of the threads on an 80 core server are waiting for a lock, and this could help reduce that. It's not game changing, but a worthwhile improvement.
> }
pthread_cond_signal(&qCondNotFull);
pthread_mutex_unlock(&qLock);
- return cmd;
+
+ struct protocol * cmd = malloc(sizeof(struct protocol));;
+
+ cmd->ver = 2;
+ cmd->cmd = cmdRenderBulk;
+ cmd->z = e->z;
+ cmd->x = e->x;
+ cmd->y = e->y;
+ strncpy(cmd->xmlname, e->mapname, XMLCONFIG_MAX - 1);
Since this existing code with no changes except indentation and position, I don't think CWE-120 is a blocker.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/pull/335#pullrequestreview-1637152376
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/mod_tile/pull/335/review/1637152376 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230921/89d82835/attachment.htm>
More information about the Tile-serving
mailing list