As P2P applications get more and more popular, firewalls require a high performance classification engine that can inspect layer-7 contents. This paper analyzes the layer-7 classification module in Linux Netfilter, the L7filter package, and proposes an alternative implementation to improve the performance of L7filter. Hence, the throughput of our method can remain high even in heavily-loaded network environments. The proposed method is justified by the Spirent SmartBits 6000 testing equipment whose traffic generation speed can achieve gigabit wire-speed.