walkerW
Convex Community3d ago
1 reply
walker

Execution Time Issue

Hi everyone, I've recently encountered some execution time issues with Convex functions:
export const getListByPagination = query({
  args: {
    paginationOpts: paginationOptsValidator,
  },
  handler: async (ctx, { paginationOpts }) => {
    Logger.time("getListByPagination");

    // do something

    Logger.timeEnd("getListByPagination");
    return xxx;
  },
});

For functions like this, the logs show:
Why is there such a large discrepancy in the timing measurements, and how should I investigate and resolve it? The critical issue is that I frequently encounter 1s warnings or even errors being triggered.

PS: This happens for both mutations and queries.
image.png
Was this page helpful?