CDB-2951 Merged with master improvement. Not mem-safe approach but faster and server should be able to cope with it