You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a custom logic to the _M.match method in radixtree_host_uri.lua in APISIX to simulate how long it takes to build a radix tree with 1000 routes. At the same time, I used Python to call the Admin API of APISIX and added 1000 routes. When I executed curl -X GET http://localhost:9080/foo, I was surprised to find that with the same number of routes, when using a similar method to call radixtree.new to build a radixtree, the performance difference between the two was as much as ten times. Why is this?
Use python to call the Admin API of APISIX and added routes.
Added custom logic of radixtree_host_uri.match()
Test
The text was updated successfully, but these errors were encountered:
Could you modify the URIs in both scenarios to be identical and try again? When the URIs are the same, there will be conflicts in the router's hash table, and this involves a lot of element movement operations. I think this is the reason.
Environment
Description
I added a custom logic to the
_M.match
method inradixtree_host_uri.lua
in APISIX to simulate how long it takes to build a radix tree with 1000 routes. At the same time, I used Python to call the Admin API of APISIX and added 1000 routes. When I executedcurl -X GET http://localhost:9080/foo
, I was surprised to find that with the same number of routes, when using a similar method to callradixtree.new
to build a radixtree, the performance difference between the two was as much as ten times. Why is this?Use python to call the Admin API of APISIX and added routes.
Added custom logic of
radixtree_host_uri.match()
Test
The text was updated successfully, but these errors were encountered: