<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Maya reading txt extremely slow (from script) in Maya Forum</title>
    <link>https://forums.autodesk.com/t5/maya-forum/maya-reading-txt-extremely-slow-from-script/m-p/9964652#M13554</link>
    <description>&lt;P&gt;So I've tried to wrote script that need to read some txt file. Just trying to open it and assign to string variable (Need to edit it next). The smallest file weights 25kb and has 670 lines.&amp;nbsp; Maya just freezes every time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;//Proc for read files and give me a string    
proc string ReadFile(string $FilePath)     {
    int $MyFileID = `fopen $FilePath "r"` ;   
    string $WholeFile ="";   
    while(!feof($MyFileID))
        $WholeFile = $WholeFile + (`fgetline $MyFileID`);
    } 
    fclose $MyFileID;
    return($WholeFile);
}

string $Text = `ReadFile("D:\Test.txt")`;
print $Text;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Dec 2020 01:37:56 GMT</pubDate>
    <dc:creator>nizrock</dc:creator>
    <dc:date>2020-12-28T01:37:56Z</dc:date>
    <item>
      <title>Maya reading txt extremely slow (from script)</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-reading-txt-extremely-slow-from-script/m-p/9964652#M13554</link>
      <description>&lt;P&gt;So I've tried to wrote script that need to read some txt file. Just trying to open it and assign to string variable (Need to edit it next). The smallest file weights 25kb and has 670 lines.&amp;nbsp; Maya just freezes every time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;//Proc for read files and give me a string    
proc string ReadFile(string $FilePath)     {
    int $MyFileID = `fopen $FilePath "r"` ;   
    string $WholeFile ="";   
    while(!feof($MyFileID))
        $WholeFile = $WholeFile + (`fgetline $MyFileID`);
    } 
    fclose $MyFileID;
    return($WholeFile);
}

string $Text = `ReadFile("D:\Test.txt")`;
print $Text;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 01:37:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-reading-txt-extremely-slow-from-script/m-p/9964652#M13554</guid>
      <dc:creator>nizrock</dc:creator>
      <dc:date>2020-12-28T01:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Maya reading txt extremely slow (from script)</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-reading-txt-extremely-slow-from-script/m-p/10506644#M13555</link>
      <description>&lt;P&gt;I'm finding the same issue, any way to read a text file quickly through Mel?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 21:13:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-reading-txt-extremely-slow-from-script/m-p/10506644#M13555</guid>
      <dc:creator>malcolm_341</dc:creator>
      <dc:date>2021-07-29T21:13:54Z</dc:date>
    </item>
  </channel>
</rss>

