Servicestack.redis there is a method called Addrangetolist, this method is a performance problem. The implementation code for this method is as follows:
public void Addrangetolist (string listId, list<string> values) {var ulistid = listid.toutf8bytes (); var pipeline = Cr Eatepipelinecommand (); foreach (var value in values) {pipeline. Writecommand (Commands.rpush, Ulistid, value. Toutf8bytes ());} Pipeline. Flush ();//the number of items after var intresults = pipeline. Readallasints ();}
This actually converts the n data into n commands. Redis's over there. For a single command parsing execution, performance can degrade a lot.
The correct approach is to use bulk rpush. See also: http://redis.readthedocs.org/en/latest/list/rpush.html
With the use of bulk Rpush, the performance of addrangetolist can be increased by one or two orders of magnitude.
[C #] Performance issues with Servicestack Read and write Redis