Commit Graph

23 Commits

Author SHA1 Message Date
Zaiming Shi 55316b3ac3 perf: micro optimisation: no lookup for non-wildcard in trie 2021-05-14 10:45:58 +02:00
Zaiming Shi 3c03047c9f fix(emqx_trie): performance issue when many levels 2021-05-14 10:45:58 +02:00
Zaiming Shi eb946eb80c fix(emqx_trie): do not try to match wildcard topics 2021-04-26 14:18:40 +02:00
Zaiming Shi 22e72cdd82 refactor(emqx_trie): rename record from eqmx_topic to emqx_trie 2021-04-26 14:18:40 +02:00
Zaiming Shi bc6a87946c refactor(emqx_trie): store only prefixes
This commit refactors emqx_trie implementation
with mainly two changes

1. Deleted the edge table.

   In the old implementation, trie consist of nodes and edges.
   e.g. for topic 'a/b/+/d', node 'a' with edge 'b'
   points to node 'a/b' and so on.

   However, edges can be computed at runtime,
   so there is no need to store them in a table.
2021-04-26 14:18:40 +02:00
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
Zaiming Shi d67212e7fa chore(test): Make test profile build 2020-12-11 08:19:26 +01:00
JianBo He 9a8859a44c refactor(topic): move triples/1 func into emqx_trie module 2020-06-18 17:38:34 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
Feng Lee 4afa02ee48 Update all the test cases 2019-08-06 09:04:37 +08:00
Feng Lee c8317a230d Update copyright 2019-08-03 11:43:30 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
Feng Lee 52241a7804 Add more test cases for code coverage 2019-01-09 11:57:22 +08:00
Feng Lee d27c824ed8 Add test case for emqx_trie:empty/0 2019-01-09 11:57:22 +08:00
Feng Lee b279eff181 Add t_mnesia/1 test case 2018-12-12 13:40:01 +08:00
Feng Lee 33830d8120 Improve the design of trie, router and broker modules
1. Add do_add_route/1 do_add_route/2, do_delete_route/1,
do_delete_route/2 APIs in emqx_router module
2. Improve the code of emqx_trie module
3. Update the emqx_broker module to call the new APIs of emqx_router
2018-12-12 13:40:01 +08:00
Feng Lee 41d1f04659 Update copyright 2018-08-28 20:37:46 +08:00
Feng Lee bffdd2ba74 Upgrade esockd and add more test cases 2018-05-22 13:01:19 +08:00
Feng Lee bbb66ff92e Refactor the broker, router modules 2018-04-10 18:17:07 +08:00
Feng Lee d7eae533ac Merge the emqx-mqtt5 library 2018-02-28 21:22:39 +08:00
Feng Lee f4fd6efe16 Merge the emqx-common, emqx-router libraries 2018-02-26 23:29:53 +08:00
Feng Lee b63c34ab14 Merge the latest master branch 2018-02-24 11:27:09 +08:00
Feng Lee 4b8cd18f5d Merge with EMQ X project 2017-10-09 19:43:06 +08:00