diff --git a/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx b/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx
index 947dd4988f10f58b1f91b83d5504abc05d04f65c..c9e7279af29eac352be5b3e05beab90ccc2e99fc 100644
--- a/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx
+++ b/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx
@@ -81,8 +81,8 @@ bool IsImplicitMTEnabled();
 
 using HeadNode_t = ::ROOT::RDF::RResultPtr<RInterface<RLoopManager, void>>;
 HeadNode_t CreateSnaphotRDF(const ColumnNames_t &validCols,
-                            const std::string &fullTreeName,
-                            const std::string &fileName,
+                            std::string_view treeName,
+                            std::string_view fileName,
                             bool isLazy,
                             RLoopManager &loopManager,
                             std::unique_ptr<RDFInternal::RActionBase> actionPtr);
diff --git a/tree/dataframe/inc/ROOT/RDF/RInterface.hxx b/tree/dataframe/inc/ROOT/RDF/RInterface.hxx
index e7cfddf587d974da1b4d03c35ebea7d5450e47ec..18a2c464e8b00625ee2cd7f4b51cd4252265546f 100644
--- a/tree/dataframe/inc/ROOT/RDF/RInterface.hxx
+++ b/tree/dataframe/inc/ROOT/RDF/RInterface.hxx
@@ -91,14 +91,6 @@ class RInterface {
    friend std::string cling::printValue(::ROOT::RDataFrame *tdf); // For a nice printing at the prompt
    friend class RDFInternal::GraphDrawing::GraphCreatorHelper;
 
-   using HeadNode_t = ::ROOT::RDF::RResultPtr<RInterface<RLoopManager, void>>;
-   friend HeadNode_t RDFInternal::CreateSnaphotRDF(const ColumnNames_t &validCols,
-                                                   const std::string &fullTreeName,
-                                                   const std::string &fileName,
-                                                   bool isLazy,
-                                                   RLoopManager &loopManager,
-                                                   std::unique_ptr<RDFInternal::RActionBase> actionPtr);
-
    template <typename T, typename W>
    friend class RInterface;
 
@@ -2061,7 +2053,7 @@ private:
 
       fLoopManager->Book(actionPtr.get());
 
-      return RDFInternal::CreateSnaphotRDF(validCols, fullTreename, std::string(filename), options.fLazy, *fLoopManager, std::move(actionPtr));
+      return RDFInternal::CreateSnaphotRDF(validCols, fullTreename, filename, options.fLazy, *fLoopManager, std::move(actionPtr));
    }
 
    ////////////////////////////////////////////////////////////////////////////
diff --git a/tree/dataframe/src/RDFInterfaceUtils.cxx b/tree/dataframe/src/RDFInterfaceUtils.cxx
index 274b04cddf72ed9d7b632153095b6885165ca87d..d60865209419a04e7b429c813a5a49a4bca87dff 100644
--- a/tree/dataframe/src/RDFInterfaceUtils.cxx
+++ b/tree/dataframe/src/RDFInterfaceUtils.cxx
@@ -9,6 +9,7 @@
  *************************************************************************/
 
 #include <ROOT/RDF/InterfaceUtils.hxx>
+#include <ROOT/RDataFrame.hxx>
 #include <ROOT/RDF/RInterface.hxx>
 #include <ROOT/RStringView.hxx>
 #include <ROOT/TSeq.hxx>
@@ -74,25 +75,15 @@ bool IsImplicitMTEnabled()
 }
 
 HeadNode_t CreateSnaphotRDF(const ColumnNames_t &validCols,
-                            const std::string &fullTreeName,
-                            const std::string &fileName,
+                            std::string_view treeName,
+                            std::string_view fileName,
                             bool isLazy,
                             RLoopManager &loopManager,
                             std::unique_ptr<RDFInternal::RActionBase> actionPtr)
 {
    // create new RDF
    ::TDirectory::TContext ctxt;
-   // Now we mimic a constructor for the RDataFrame. We cannot invoke it here
-   // since this would introduce a cyclic headers dependency.
-
-   // Keep these two statements separated to work-around an ABI incompatibility
-   // between clang (and thus cling) and gcc in the way std::forward is handled.
-   // See https://sft.its.cern.ch/jira/browse/ROOT-9236 for more detail.
-   auto rlm_ptr = std::make_shared<RLoopManager>(nullptr, validCols);
-   auto snapshotRDF = std::make_shared<RInterface<RLoopManager>>(rlm_ptr);
-   auto chain = std::make_shared<TChain>(fullTreeName.c_str());
-   chain->Add(std::string(fileName).c_str());
-   snapshotRDF->fProxiedPtr->SetTree(chain);
+   auto snapshotRDF = std::make_shared<ROOT::RDataFrame>(treeName, fileName, validCols);
    auto snapshotRDFResPtr = MakeResultPtr(snapshotRDF, loopManager, std::move(actionPtr));
 
    if (!isLazy) {